diff options
author | agc <agc@pkgsrc.org> | 2002-08-07 10:56:11 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2002-08-07 10:56:11 +0000 |
commit | 9a4f22c0ba9162bb3cc79845c58981d57a4580e5 (patch) | |
tree | f64b34ef822f15e8ce86a64ff0cdfe3a5048be37 /mk/bulk/build | |
parent | abd1be5e66225f52f68c555ea2918de26a63b5f6 (diff) | |
download | pkgsrc-9a4f22c0ba9162bb3cc79845c58981d57a4580e5.tar.gz |
Make these scripts useful on platforms other than NetBSD by using a BMAKE
environment variable, which contains the name of the make(1) program to
invoke - suggestion by Julien Letessier some time ago, the confusion mine,
since I thought he was referring to something else completely.
Don't rely on there being a POSIX tr(1) in the path by default - test
explicitly for both "yes" and "YES".
Set the default for PRUNEDISTFILES to "no", since we can't assume that
the user wants us to delete something which he may have been keeping
around, and there are other ways of accomplishing this aim (lintpkgsrc
-o, for example).
Clean up some superfluous white space at the end of lines.
Diffstat (limited to 'mk/bulk/build')
-rw-r--r-- | mk/bulk/build | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/mk/bulk/build b/mk/bulk/build index 4db19b7ab82..6c13d691214 100644 --- a/mk/bulk/build +++ b/mk/bulk/build @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: build,v 1.22 2002/08/06 18:14:49 agc Exp $ +# $NetBSD: build,v 1.23 2002/08/07 10:56:11 agc Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@netbsd.org> @@ -34,6 +34,14 @@ # Do builk build # +opsys=`uname -s` +case "$opsys" in +NetBSD) BMAKE=make ;; +*) BMAKE=bmake ;; +esac + +export BMAKE + # Set ressource limits as high as possible ulimit -S -s `ulimit -H -s` ulimit -S -d `ulimit -H -d` @@ -78,14 +86,14 @@ fi fail=no if [ -d pkgtools/pkglint ]; then cd pkgtools/pkglint - DEPENDSTREEFILE=`make show-var VARNAME=DEPENDSTREEFILE` || fail=yes - DEPENDSFILE=`make show-var VARNAME=DEPENDSFILE` || fail=yes - SUPPORTSFILE=`make show-var VARNAME=SUPPORTSFILE` || fail=yes - INDEXFILE=`make show-var VARNAME=INDEXFILE` || fail=yes - ORDERFILE=`make show-var VARNAME=ORDERFILE` || fail=yes - BROKENFILE=`make show-var VARNAME=BROKENFILE` || fail=yes - BUILDLOG=`make show-var VARNAME=BUILDLOG` || fail=yes - STARTFILE=`make show-var VARNAME=STARTFILE` || fail=yes + DEPENDSTREEFILE=`${BMAKE} show-var VARNAME=DEPENDSTREEFILE` || fail=yes + DEPENDSFILE=`${BMAKE} show-var VARNAME=DEPENDSFILE` || fail=yes + SUPPORTSFILE=`${BMAKE} show-var VARNAME=SUPPORTSFILE` || fail=yes + INDEXFILE=`${BMAKE} show-var VARNAME=INDEXFILE` || fail=yes + ORDERFILE=`${BMAKE} show-var VARNAME=ORDERFILE` || fail=yes + BROKENFILE=`${BMAKE} show-var VARNAME=BROKENFILE` || fail=yes + BUILDLOG=`${BMAKE} show-var VARNAME=BUILDLOG` || fail=yes + STARTFILE=`${BMAKE} show-var VARNAME=STARTFILE` || fail=yes else echo "The pkgtools/pkglint directory does not exist. Please update" echo "your pkgsrc tree in ${USR_PKGSRC}" @@ -127,7 +135,7 @@ cd ${USR_PKGSRC} # get the list of packages which should always be installed during the build cd ${USR_PKGSRC}/pkgtools/pkglint -BULK_PREREQ=`make show-var VARNAME=BULK_PREREQ` +BULK_PREREQ=`${BMAKE} show-var VARNAME=BULK_PREREQ` cd ${USR_PKGSRC} # install prerequisite packages. Note: we do this _before_ the depends tree @@ -137,13 +145,13 @@ for pkgdir in $BULK_PREREQ do echo $pkgdir # make sure its installed _and_ packaged - cd ${USR_PKGSRC}/$pkgdir && make bulk-install + cd ${USR_PKGSRC}/$pkgdir && ${BMAKE} bulk-install done # Create the bulk cache files cd ${USR_PKGSRC} if [ "$1" != "restart" ]; then - cd ${USR_PKGSRC} && make bulk-cache + cd ${USR_PKGSRC} && ${BMAKE} bulk-cache fi echo "Starting actual build using the order specified in $ORDERFILE..." @@ -168,7 +176,7 @@ do if ! grep -q "^${pkgdir}\$" $BUILDLOG ; then built=`wc -l $BUILDLOG | awk '{print $1}'` percent=`echo $built $tot | awk '{printf("%4.1f%%",$1*100/$2);}'` - (cd $pkgdir && nice -n 20 make USE_BULK_CACHE=yes bulk-package </dev/null | sed "s;^;`date '+%m/%d/%y %H:%M:%S'` $built/${tot}=$percent $pkgdir @ `uname -p`> ;g") + (cd $pkgdir && nice -n 20 ${BMAKE} USE_BULK_CACHE=yes bulk-package </dev/null | sed "s;^;`date '+%m/%d/%y %H:%M:%S'` $built/${tot}=$percent $pkgdir @ `uname -p`> ;g") echo "$pkgdir" >> $BUILDLOG fi done @@ -200,7 +208,7 @@ echo "Post processing bulk build results..." #rm $DEPENDSTREEFILE $DEPENDSFILE $SUPPORTSFILE $INDEXFILE $ORDERFILE # Perl was wiped, reinstall it! -( cd lang/perl5 && make bulk-install ) +( cd lang/perl5 && ${BMAKE} bulk-install ) perl mk/bulk/post-build | mail -s "pkgsrc/`uname -p` bulk build results `date +%F`" $ADMIN # Done! |