From b4f9ba38eec1ed9705644bb739c678852ec40f5b Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 4 Dec 2015 07:54:04 +0000 Subject: [PATCH] Rearrange some common logic. --- share/mk/bsd.subdir.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 12f2fa5477d9..1854d99449e8 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -116,17 +116,17 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} +# Only recurse on directly-called targets. I.e., don't recurse on dependencies +# such as 'install' becoming {before,real,after}install, just recurse +# 'install'. +.if make(${__target}) # Can ordering be skipped for this and SUBDIR_PARALLEL forced? -.if make(${__target}) && ${STANDALONE_SUBDIR_TARGETS:M${__target}} +.if ${STANDALONE_SUBDIR_TARGETS:M${__target}} _is_standalone_target= 1 SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif -# Only recurse on directly-called targets. I.e., don't recurse on dependencies -# such as 'install' becoming {before,real,after}install, just recurse -# 'install'. -.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR}