svn commit: r265934 - stable/10/share/mk
Ian Lepore
ian at FreeBSD.org
Mon May 12 21:22:54 UTC 2014
Author: ian
Date: Mon May 12 21:22:53 2014
New Revision: 265934
URL: http://svnweb.freebsd.org/changeset/base/265934
Log:
MFC r264822: Allow .WAIT to appear in SUBDIR= lists
Modified:
stable/10/share/mk/bsd.subdir.mk
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/mk/bsd.subdir.mk
==============================================================================
--- stable/10/share/mk/bsd.subdir.mk Mon May 12 21:21:32 2014 (r265933)
+++ stable/10/share/mk/bsd.subdir.mk Mon May 12 21:22:53 2014 (r265934)
@@ -45,7 +45,7 @@ distribute: .MAKE
_SUBDIR: .USE .MAKE
.if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
- @${_+_}set -e; for entry in ${SUBDIR}; do \
+ @${_+_}set -e; for entry in ${SUBDIR:N.WAIT}; do \
if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \
edir=$${entry}.${MACHINE_ARCH}; \
@@ -60,7 +60,7 @@ _SUBDIR: .USE .MAKE
done
.endif
-${SUBDIR}: .PHONY .MAKE
+${SUBDIR:N.WAIT}: .PHONY .MAKE
${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \
cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \
else \
@@ -68,12 +68,18 @@ ${SUBDIR}: .PHONY .MAKE
fi; \
${MAKE} all
+# Work around parsing of .if nested in .for by putting .WAIT string into a var.
+__wait= .WAIT
.for __target in all all-man checkdpadd clean cleandepend cleandir \
cleanilinks depend distribute lint maninstall manlint obj objlink \
realinstall regress tags ${SUBDIR_TARGETS}
.ifdef SUBDIR_PARALLEL
+__subdir_targets=
.for __dir in ${SUBDIR}
-${__target}: ${__target}_subdir_${__dir}
+.if ${__wait} == ${__dir}
+__subdir_targets+= .WAIT
+.else
+__subdir_targets+= ${__target}_subdir_${__dir}
${__target}_subdir_${__dir}: .MAKE
@${_+_}set -e; \
if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \
@@ -87,7 +93,9 @@ ${__target}_subdir_${__dir}: .MAKE
fi; \
${MAKE} ${__target:realinstall=install} \
DIRPRFX=${DIRPRFX}$$edir/
+.endif
.endfor
+${__target}: ${__subdir_targets}
.else
${__target}: _SUBDIR
.endif
More information about the svn-src-all
mailing list