summaryrefslogtreecommitdiff
path: root/mk/bulk/bsd.bulk-pkg.mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2001-12-17 02:32:22 +0000
committerdmcmahill <dmcmahill>2001-12-17 02:32:22 +0000
commitfcef78fe9cbfdd7836e173ee0720bb2e40c9e286 (patch)
tree46206899ae8ca78a529c724dd73b18e44d6a3b43 /mk/bulk/bsd.bulk-pkg.mk
parent00880eaf1b79d1bb91718c759d52e0d53f74e2a8 (diff)
downloadpkgsrc-fcef78fe9cbfdd7836e173ee0720bb2e40c9e286.tar.gz
- add 'bulk-cache' and 'clean-bulk-cache' targets to create and remove
the cache files used during a bulk pkgsrc build. - replace the code in the build script that used to create the cache files with a 'make bulk-cache' call.
Diffstat (limited to 'mk/bulk/bsd.bulk-pkg.mk')
-rw-r--r--mk/bulk/bsd.bulk-pkg.mk32
1 files changed, 31 insertions, 1 deletions
diff --git a/mk/bulk/bsd.bulk-pkg.mk b/mk/bulk/bsd.bulk-pkg.mk
index e8da68195b5..16767b20ffb 100644
--- a/mk/bulk/bsd.bulk-pkg.mk
+++ b/mk/bulk/bsd.bulk-pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.bulk-pkg.mk,v 1.33 2001/12/16 14:27:07 dmcmahill Exp $
+# $NetBSD: bsd.bulk-pkg.mk,v 1.34 2001/12/17 02:32:23 dmcmahill Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@netbsd.org>
@@ -105,6 +105,35 @@ ORDERFILE?= ${_PKGSRCDIR}/.order
# and also for xpkgwedge. Add pkgtools/xpkgwedge in /etc/mk.conf to do an xpkgwedged bulk build.
BULK_PREREQ+= pkgtools/digest
+
+# build the cache files used as part of a full bulk build
+# Note: we have to install the BULK_PREREQ packages _before_
+# extracting the depends tree because some packages like
+# xpkgwedge only become DEPENDS if it is installed
+bulk-cache:
+ ${ECHO_MSG} "Installing BULK_PREREQ packages"
+.for __prereq in ${BULK_PREREQ}
+ cd ${_PKGSRCDIR}/${__prereq} && ${MAKE} bulk-install
+.endfor
+ @${ECHO_MSG} "BULK> Building complete pkgsrc dependency tree (this may take a while)."
+ cd ${_PKGSRCDIR} && ${SH} mk/bulk/printdepends ${BROKENFILE} > ${DEPENDSTREEFILE}
+ @${ECHO_MSG} "BULK> Sorting build order."
+ tsort ${DEPENDSTREEFILE} > ${ORDERFILE}
+ @${ECHO_MSG} "BULK> Generating up and down dependency files."
+ ${_PKGSRCDIR}/mk/bulk/tflat -u ${DEPENDSTREEFILE} > ${SUPPORTSFILE}
+ ${_PKGSRCDIR}/mk/bulk/tflat -d ${DEPENDSTREEFILE} > ${DEPENDSFILE}
+ @${ECHO_MSG} "BULK> Generating package name <=> package directory cross reference file"
+ @${ECHO_MSG} " (this may take a while)."
+ cd ${_PKGSRCDIR} && ${SH} mk/bulk/printindex ${BROKENFILE} > ${INDEXFILE}
+
+# remove the bulk cache files
+clean-bulk-cache:
+ ${RM} -f ${DEPENDSTREEFILE} \
+ ${DEPENDSFILE} \
+ ${SUPPORTSFILE} \
+ ${INDEXFILE} \
+ ${ORDERFILE}
+
# check if the $REF file is uptodate, i.e. is newer than any of
# the pkg files; prints "1" if upto date, "0" if not.
bulk-check-uptodate:
@@ -338,3 +367,4 @@ bulk-install:
${ECHO_MSG} ${MAKE} bulk-package PRECLEAN=no; \
${DO} ${MAKE} bulk-package PRECLEAN=no; \
fi
+