diff options
author | wiz <wiz@pkgsrc.org> | 2004-07-06 23:18:04 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2004-07-06 23:18:04 +0000 |
commit | 9f9244dd81c14eaabf914c76d166097f6312362e (patch) | |
tree | da9e023371cab1c2b44244bc3673b37bed8df613 /pkgtools | |
parent | 546b8ebebfd43ff7bea33b76152a129b04fe7ec8 (diff) | |
download | pkgsrc-9f9244dd81c14eaabf914c76d166097f6312362e.tar.gz |
Remove support for creating buildlink2.mk files.
Make buildlink3.mk file output the default, and ignore any "-3" flags
on the command line for people who can't change their habits quickly.
Increase version to 3.5.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/createbuildlink/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/createbuildlink/files/createbuildlink | 130 | ||||
-rw-r--r-- | pkgtools/createbuildlink/files/createbuildlink.8 | 19 |
3 files changed, 16 insertions, 137 deletions
diff --git a/pkgtools/createbuildlink/Makefile b/pkgtools/createbuildlink/Makefile index 6b618fddbc9..175b4d44841 100644 --- a/pkgtools/createbuildlink/Makefile +++ b/pkgtools/createbuildlink/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.29 2004/03/18 10:47:04 jlam Exp $ +# $NetBSD: Makefile,v 1.30 2004/07/06 23:18:04 wiz Exp $ -DISTNAME= createbuildlink-3.4 +DISTNAME= createbuildlink-3.5 CATEGORIES= pkgtools sysutils MASTER_SITES= # Nothing DISTFILES= # Nothing diff --git a/pkgtools/createbuildlink/files/createbuildlink b/pkgtools/createbuildlink/files/createbuildlink index 44db4e1dda2..4995caa3a7e 100755 --- a/pkgtools/createbuildlink/files/createbuildlink +++ b/pkgtools/createbuildlink/files/createbuildlink @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: createbuildlink,v 1.22 2004/04/27 03:51:24 dmcmahill Exp $ +# $NetBSD: createbuildlink,v 1.23 2004/07/06 23:18:04 wiz Exp $ # # Copyright (c) 2002 The NetBSD Foundation, Inc. # All rights reserved. @@ -40,35 +40,23 @@ # and PLIST # -REV=`echo '$Revision: 1.22 $' | sed 's/\\$//g'` +REV=`echo '$Revision: 1.23 $' | sed 's/\\$//g'` tmpdir=/tmp spacesintab=8 makefile=Makefile sedrules=$tmpdir/sedrules.buildlink.$$ PLIST=PLIST -blver=2 -otherver=3 -args=`getopt j23 $*` +args=`getopt 3 $*` if [ $? != 0 ]; then - echo "Usage: $0 -2 [-j] > buildlink2.mk" - echo " or: $0 -3 > buildlink3.mk" + echo "Usage: $0 > buildlink3.mk" exit 2 fi set -- $args while [ $# -gt 0 ]; do case "$1" in - -j) - join=YES - ;; - -2) - blver=2 - otherver=3 - ;; -3) - blver=3 - otherver=2 - ;; + shift;; --) shift; break ;; @@ -85,12 +73,6 @@ if [ ! -f $makefile ]; then exit 1 fi -if [ $blver = 2 -a ! -f "$PLIST" ]; then - echo "===> Incomplete package! To create a buildlink file <===" - echo "===> a working PLIST is required! <===" - exit 1 -fi - ## ## try to find any included Makefile.common's ## @@ -135,7 +117,7 @@ sed -f $sedrules <<EOF # XXX This file was created automatically using createbuildlink-@PKGVERSION@. # XXX After this file as been verified as correct, the comment lines # XXX beginning with "XXX" should be removed. Please do not commit -# XXX unverified buildlink[23].mk files. +# XXX unverified buildlink3.mk files. # XXX # XXX Packages that only install static libraries or headers should # XXX include the following line: @@ -144,19 +126,6 @@ sed -f $sedrules <<EOF EOF -## -## buildlink 2 -## -if [ $blver = 2 ]; then - -sed -f $sedrules <<EOF -.if !defined(${PKGUPPER}_BUILDLINK2_MK) -${PKGUPPER}_BUILDLINK2_MK= # defined - -EOF - -else # buildlink 3 - gap=" " for i in 1 2 3; do n=`expr $i \* $spacesintab` @@ -182,114 +151,31 @@ BUILDLINK_PACKAGES+= $PKGNOVER .if !empty(${PKGUPPER}_BUILDLINK3_MK:M+) EOF -fi # buildlink 2/3 - -if [ $blver = 2 ]; then - -sed -f $sedrules <<EOF -BUILDLINK_PACKAGES+= $PKGNOVER -BUILDLINK_DEPENDS.$PKGNOVER?= $PKGNOVER>=$PKGVER -EOF - -else # [ $blver = 3 ] - sed -f $sedrules <<EOF BUILDLINK_DEPENDS.$PKGNOVER+= $PKGNOVER>=$PKGVER EOF -fi - sed -f $sedrules <<EOF BUILDLINK_PKGSRCDIR.$PKGNOVER?= ../../$CURDIR EOF -if [ $blver = 3 ]; then - sed -f $sedrules <<EOF .endif # ${PKGUPPER}_BUILDLINK3_MK EOF -fi - -## -## buildlink2-only part -## -if [ $blver = 2 ]; then -sed -f $sedrules <<EOF - -EVAL_PREFIX+= BUILDLINK_PREFIX.$PKGNOVER=$PKGNOVER -BUILDLINK_PREFIX.${PKGNOVER}_DEFAULT= \${$PREFIX} -EOF - -## -## buildlinked includes (buildlink2 only) -## -if [ "$join" = "YES" ]; then - for i in `egrep "^include/|/Headers/.*\.h" $PLIST \ - | sed -e 's|[^/]*\.h\([Hhpx+]*\)$|*.h\1|' | sort -u`; do - echo "BUILDLINK_FILES.$PKGNOVER+= $i" - done -else - for i in `egrep "^include/|/Headers/.*\.h" $PLIST` ; do - echo "BUILDLINK_FILES.$PKGNOVER+= $i" - done -fi - -## -## buildlinked libraries (buildlink2 only) -## -for i in \ -`egrep '^lib/|/Libraries/.*/lib[^\.]*\.a$|/Libraries/.*/lib[^\.]*\.so' $PLIST \ -| egrep -v '\.pc$' | sed -e 's/\.a$/.*/' -e 's/\.la$/.*/' -e 's/\.so.*$/.*/' \ -| sort -u`; do - echo "BUILDLINK_FILES.$PKGNOVER+= $i" -done - -fi ## end of buildlink2-only part - ## ## buildlinked dependencies ## -grep -l '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $makefile $commons \ +grep -l '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $makefile $commons \ >/dev/null 2>&1 && echo "" # Be careful not to print duplicate \n for i in $makefile $commons ; do - [ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $i | - sed "s/buildlink$otherver/buildlink$blver/" | + [ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $i | egrep -v '/devel/pkgconfig/|/textproc/intltool/' done -if [ $blver = 2 ]; then -grep -l '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $makefile $commons \ - >/dev/null 2>&1 && echo "" # Be careful not to print duplicate \n -fi - -## -## buildlink2-only part -## -if [ $blver = 2 ]; then -## -## main buildlink target for this package -## -sed -f $sedrules <<EOF -BUILDLINK_TARGETS+= ${PKGNOVER}-buildlink - -EOF - -## -## buildlink targets for this package -## -sed -f $sedrules <<EOF -${PKGNOVER}-buildlink: _BUILDLINK_USE - -.endif # ${PKGUPPER}_BUILDLINK2_MK -EOF - -else # buildlink 3 sed -f $sedrules <<EOF BUILDLINK_DEPTH:= \${BUILDLINK_DEPTH:S/+\$//} EOF -fi # buildlink 2/3 - rm -f $sedrules diff --git a/pkgtools/createbuildlink/files/createbuildlink.8 b/pkgtools/createbuildlink/files/createbuildlink.8 index f5226520ed7..7ea14296158 100644 --- a/pkgtools/createbuildlink/files/createbuildlink.8 +++ b/pkgtools/createbuildlink/files/createbuildlink.8 @@ -1,6 +1,6 @@ -.\" $NetBSD: createbuildlink.8,v 1.7 2004/01/14 14:17:47 wiz Exp $ +.\" $NetBSD: createbuildlink.8,v 1.8 2004/07/06 23:18:04 wiz Exp $ .\" -.\" Copyright (c) 2002 The NetBSD Foundation, Inc. +.\" Copyright (c) 2002,2004 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -34,7 +34,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 14, 2004 +.Dd July 6, 2004 .Dt CREATEBUILDLINK 8 .Os .Sh NAME @@ -42,7 +42,7 @@ .Nd automatic pkgsrc buildlink2.mk and buildlink3.mk generator .Sh SYNOPSIS .Nm -.Op Fl 23j +.Op Fl 3 .Sh DESCRIPTION .Nm reads in the @@ -51,20 +51,13 @@ and .Pa PLIST of a package and creates an initial -.Pa buildlink2.mk +.Pa buildlink3.mk file on stdout. .Pp The following options are available: .Bl -tag -width indent -.It Fl 2 -Create buildlink2.mk style output (the default). .It Fl 3 -Create buildlink3.mk style output. -.It Fl j -Join together all .h files in an include directory and list as *.h. -Be careful with this option and only use it if you are sure that the -package in question is the only one providing header files in the PLISTed -directory. +Create buildlink3.mk style output. (default) .El .Pp While |