summaryrefslogtreecommitdiff
path: root/mk/pbulk
diff options
context:
space:
mode:
authorjoerg <joerg>2016-12-17 23:41:51 +0000
committerjoerg <joerg>2016-12-17 23:41:51 +0000
commitcfc57106cb58fff8feb4ccb12e6385057fb7bce1 (patch)
tree8b157409d6fcb0412840e64f625e0a054bd58a2e /mk/pbulk
parent143b2e8aad4f487422830dd0585cf02096fcf620 (diff)
downloadpkgsrc-cfc57106cb58fff8feb4ccb12e6385057fb7bce1.tar.gz
Add optional caching of extracted build options. As the number of users
of this feature has exploded over recent years, this avoids quadratic complexity for many packages during scan and build phase of a bulk build. Pbulk logic for exploiting this feature will be committed separately. Over all, this saves ~66% for wm/xfce4-wm with initially empty cache and ~90% when the cache is populated. Total scan time can be cut in half.
Diffstat (limited to 'mk/pbulk')
-rw-r--r--mk/pbulk/pbulk-index.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/pbulk/pbulk-index.mk b/mk/pbulk/pbulk-index.mk
index 45c76d642fa..61a70320be7 100644
--- a/mk/pbulk/pbulk-index.mk
+++ b/mk/pbulk/pbulk-index.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pbulk-index.mk,v 1.22 2016/09/08 15:19:18 joerg Exp $
+# $NetBSD: pbulk-index.mk,v 1.23 2016/12/17 23:41:52 joerg Exp $
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to the parallel bulk build
@@ -104,6 +104,12 @@ pbulk-index:
${_PBULK_MULTI_NEEDED:@._t.@;done@}
.endif
+.if defined(PBULK_CACHE_DIRECTORY)
+_PBULK_SCAN_DEPENDS= ${.MAKE.MAKEFILES:N${PBULK_CACHE_DIRECTORY}/*}
+.else
+_PBULK_SCAN_DEPENDS= ${.MAKE.MAKEFILES}
+.endif
+
pbulk-index-item:
@echo "PKGNAME="${PKGNAME:Q}
@echo "ALL_DEPENDS="${_ALL_DEPENDS:Q}
@@ -116,7 +122,7 @@ pbulk-index-item:
@echo "USE_DESTDIR="${_USE_DESTDIR:Q}
@echo "BOOTSTRAP_PKG="${BOOTSTRAP_PKG}
@echo "USERGROUP_PHASE="${USERGROUP_PHASE:Q}
- @echo "SCAN_DEPENDS="${.MAKE.MAKEFILES:Q}
+ @echo "SCAN_DEPENDS="${_PBULK_SCAN_DEPENDS:Q}
.if defined(_PBULK_MULTI_NEEDED)
@printf "MULTI_VERSION="
.for _t in ${_PBULK_MULTI_NEEDED}