summaryrefslogtreecommitdiff
path: root/mk/pbulk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-12-17 23:41:51 +0000
committerjoerg <joerg@pkgsrc.org>2016-12-17 23:41:51 +0000
commitd36ec83762676256a3deb0608f9c948d4c863afb (patch)
treec757fd2116e20eaaaad5ba1210560d673c5c9d58 /mk/pbulk
parente004920a7893f54f29ec01143775aff9f3301b9a (diff)
downloadpkgsrc-d36ec83762676256a3deb0608f9c948d4c863afb.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}