summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-22 23:41:56 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-22 23:41:56 +0000
commit7761ab52bc8e13748cf8341eed2f9ef611b631c9 (patch)
treec43815b143744c1c367d450d0458ffdc75b4659d /share/mk
parent301161890619e332e7af5d9037978b797203361a (diff)
downloadFreeBSD-src-7761ab52bc8e13748cf8341eed2f9ef611b631c9.zip
FreeBSD-src-7761ab52bc8e13748cf8341eed2f9ef611b631c9.tar.gz
For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to
respect SUBDIR_DEPEND_* or .WAIT. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.subdir.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index a6eb98c..8275afd 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -83,6 +83,15 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
dir=${.TARGET}; \
${_SUBDIR_SH};
+# .WAIT and dependencies can be skipped for some targets.
+.if defined(SUBDIR_PARALLEL)
+.if make(obj) || make(clean*)
+_skip_subdir_ordering= 1
+SUBDIR:= ${SUBDIR:N.WAIT}
+.else
+_skip_subdir_ordering= 0
+.endif
+.endif # defined(SUBDIR_PARALLEL)
# Work around parsing of .if nested in .for by putting .WAIT string into a var.
__wait= .WAIT
.for __target in ${ALL_SUBDIR_TARGETS}
@@ -94,9 +103,11 @@ __subdir_targets+= .WAIT
.else
__subdir_targets+= ${__target}_subdir_${__dir}
__deps=
+.if ${_skip_subdir_ordering} == 0
.for __dep in ${SUBDIR_DEPEND_${__dir}}
__deps+= ${__target}_subdir_${__dep}
.endfor
+.endif
${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps}
.if !defined(NO_SUBDIR)
@${_+_}target=${__target:realinstall=install}; \
OpenPOWER on IntegriCloud