diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-16 22:44:06 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-16 22:44:06 +0000 |
commit | 43a50150dbab88e65fb4ece688ca869347eff552 (patch) | |
tree | af4ecdf001fadc34fa110dc2bdfb503315027214 /mk | |
parent | 8a82999f665e6e9e4283fb13d136d42af2cf96ee (diff) | |
download | pkgsrc-43a50150dbab88e65fb4ece688ca869347eff552.tar.gz |
Changes for enabling separate BULKFILESDIR and PKGSRCDIR.
- The main .make file is stored in ${BULKFILESDIR} instead of ${PKGSRCDIR}.
- The PKGLIST variable from the configuration file is passed to the
bulk-cache command in the environment. There are very few variables left
that have to be exported via export_config_vars(). Maybe that function
can be avoided alltogether.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bulk/build | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/mk/bulk/build b/mk/bulk/build index 296e331da55..79386ee41c7 100644 --- a/mk/bulk/build +++ b/mk/bulk/build @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: build,v 1.75 2005/11/11 10:49:41 rillig Exp $ +# $NetBSD: build,v 1.76 2005/11/16 22:44:06 rillig Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org> @@ -244,6 +244,7 @@ fail=no if cd "${pkglint_dir}"; then echo "Extracting relevant pkgsrc variables..." + BULKFILESDIR=`${BMAKE} show-var VARNAME=BULKFILESDIR` || fail=yes BULK_DBFILE=`${BMAKE} show-var VARNAME=BULK_DBFILE` || fail=yes DEPENDSTREEFILE=`${BMAKE} show-var VARNAME=DEPENDSTREEFILE` || fail=yes DEPENDSFILE=`${BMAKE} show-var VARNAME=DEPENDSFILE` || fail=yes @@ -272,6 +273,7 @@ fi echo "+----------------------------------------+" echo "| Some variables used in the bulk build: |" echo "+----------------------------------------+" +echo "BULKFILESDIR = $BULKFILESDIR" echo "BULK_DBFILE = $BULK_DBFILE" echo "BULK_PREREQ = $BULK_PREREQ" echo "DEPENDSTREEFILE = $DEPENDSTREEFILE" @@ -323,6 +325,11 @@ if [ $fail = "yes" -o \ fi # +# Get the location of commonly used files +# +main_buildlog="${BULKFILESDIR}/${BUILDLOG}" + +# # Install prerequisite packages. # # Note: we do this _before_ the depends tree because some packages like @@ -341,7 +348,7 @@ done # if [ "x$restart" != "xyes" ]; then ( cd "${pkgsrc_dir}" \ - && ${BMAKE} bulk-cache $makeargs + && env PKGLIST="${PKGLIST-}" ${BMAKE} bulk-cache $makeargs ) || die "Could not create the bulk build cache." fi @@ -362,21 +369,21 @@ echo "Starting actual build using the order specified in $ORDERFILE..." # can make a progress-meter very simple to add! # make sure we have something to grep in in the build loop -touch "${BUILDLOG}" || die "Cannot write to ${pkgsrc_dir}/${BUILDLOG}." +touch "${main_buildlog}" || die "Cannot write to ${main_buildlog}." tot=`wc -l $ORDERFILE | ${AWK} '{print $1}'` for pkgdir in `cat $ORDERFILE` do - if ${GREP} -q "^${pkgdir}\$" "${BUILDLOG}"; then + if ${GREP} -q "^${pkgdir}\$" "${main_buildlog}"; then : "skip this package" else - built=`wc -l $BUILDLOG | ${AWK} '{print $1}'` + built=`wc -l "${main_buildlog}" | ${AWK} '{print $1}'` percent=`echo $built $tot | ${AWK} '{printf("%4.1f%%",$1*100/$2);}'` ( cd "${pkgsrc_dir}/${pkgdir}" \ && ${NICE_LEVEL} ${BMAKE} USE_BULK_CACHE=yes $target \ $makeargs </dev/null | post_filter_cmd ) || true - echo "$pkgdir" >> $BUILDLOG + echo "$pkgdir" >> "${main_buildlog}" fi done |