diff options
author | rh <rh@pkgsrc.org> | 2002-10-16 08:50:48 +0000 |
---|---|---|
committer | rh <rh@pkgsrc.org> | 2002-10-16 08:50:48 +0000 |
commit | 30cf40c883527cbffd192374b877d42f8d735542 (patch) | |
tree | 33cde8b4cbf67de2249d491e1d193d2552eb961c /pkgtools/createbuildlink | |
parent | e865e96f40799dc621a08b08513f70a66fe5f95a (diff) | |
download | pkgsrc-30cf40c883527cbffd192374b877d42f8d735542.tar.gz |
Update createbuildlink to 2.2. Now includes a '-j' option to join together
PLISTed header files in a directory, listing them as '*.h'
Diffstat (limited to 'pkgtools/createbuildlink')
-rw-r--r-- | pkgtools/createbuildlink/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/createbuildlink/files/createbuildlink | 35 | ||||
-rw-r--r-- | pkgtools/createbuildlink/files/createbuildlink.8 | 14 |
3 files changed, 44 insertions, 9 deletions
diff --git a/pkgtools/createbuildlink/Makefile b/pkgtools/createbuildlink/Makefile index 81980d04969..bc5a1d4dcd0 100644 --- a/pkgtools/createbuildlink/Makefile +++ b/pkgtools/createbuildlink/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.9 2002/09/27 21:19:58 rh Exp $ +# $NetBSD: Makefile,v 1.10 2002/10/16 08:50:48 rh Exp $ # -DISTNAME= createbuildlink-2.1 +DISTNAME= createbuildlink-2.2 CATEGORIES= pkgtools sysutils MASTER_SITES= # Nothing DISTFILES= # Nothing diff --git a/pkgtools/createbuildlink/files/createbuildlink b/pkgtools/createbuildlink/files/createbuildlink index 8dd036e27af..08c2e870142 100755 --- a/pkgtools/createbuildlink/files/createbuildlink +++ b/pkgtools/createbuildlink/files/createbuildlink @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: createbuildlink,v 1.8 2002/09/27 21:19:59 rh Exp $ +# $NetBSD: createbuildlink,v 1.9 2002/10/16 08:50:49 rh Exp $ # # Copyright (c) 2002 The NetBSD Foundation, Inc. # All rights reserved. @@ -39,12 +39,30 @@ # Create an initial buildlink2.mk from a package's Makefile and PLIST # -REV=`echo '$Revision: 1.8 $' | sed 's/\\$//g'` +REV=`echo '$Revision: 1.9 $' | sed 's/\\$//g'` tmpdir=/tmp makefile=Makefile sedrules=$tmpdir/sedrules.buildlink.$$ PLIST=PLIST +args=`getopt j $*` +if [ $? != 0 ]; then + echo "Usage: $0 [-j] > buildlink2.mk" + exit 2 +fi +set -- $args +while [ $# -gt 0 ]; do + case "$1" in + -j) + join=YES + ;; + --) + shift; break + ;; + esac + shift +done + ## ## some simple integrity checking ## @@ -120,9 +138,16 @@ EOF ## ## buildlinked includes ## -for i in `grep "^include/" $PLIST` `grep "/Headers/.*\.h" $PLIST` ; do - echo "BUILDLINK_FILES.$PKGNOVER+= $i" -done +if [ $join = "YES" ]; then + for i in `egrep "^include/|/Headers/.*\.h" $PLIST \ + | sed -e 's|[^/]*\.h$|*.h|' | sort | uniq`; 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 diff --git a/pkgtools/createbuildlink/files/createbuildlink.8 b/pkgtools/createbuildlink/files/createbuildlink.8 index a4e6d2440c6..e674fb40a76 100644 --- a/pkgtools/createbuildlink/files/createbuildlink.8 +++ b/pkgtools/createbuildlink/files/createbuildlink.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: createbuildlink.8,v 1.3 2002/09/06 00:36:14 rh Exp $ +.\" $NetBSD: createbuildlink.8,v 1.4 2002/10/16 08:50:50 rh Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -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 September 6, 2002 +.Dd October 16, 2002 .Dt CREATEBUILDLINK 8 .Os .Sh NAME @@ -42,6 +42,7 @@ .Nd automatic NetBSD buildlink2.mk generator .Sh SYNOPSIS .Nm +.Op Fl j .Sh DESCRIPTION .Nm reads in the @@ -53,6 +54,15 @@ an initial .Pa buildlink2.mk file on stdout. .Pp +The following options are available: +.Bl -tag -width indent +.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. +.El +.Pp While .Nm is supposed to help starting create a |