From 3b53f994ea89486d859e6bb4144b19e07ea77cea Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 4 Jul 2019 14:51:44 +0000 Subject: [PATCH] Consider *clean targets as non-build targets as well. MFC after: 2 weeks Sponsored by: DellEMC --- share/mk/bsd.init.mk | 3 ++- share/mk/bsd.sys.mk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index dca1bfc9005d..62506e9887de 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -58,11 +58,12 @@ $xGRP= ${_gid} # things like 'make all install' or 'make foo install'. # - non-build targets are called .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ - ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) + ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) && !make(*clean) _SKIP_BUILD= not building at level 0 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ ${.TARGETS:Mclean*} == ${.TARGETS} || \ + ${.TARGETS:M*clean} == ${.TARGETS} || \ ${.TARGETS:Mdestroy*} == ${.TARGETS} || \ ${.TARGETS:Mobj} == ${.TARGETS} || \ make(analyze) || make(print-dir) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 5adef37c347c..940d094df835 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -284,7 +284,7 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall .NOTMAIN: ${PHONY_NOTMAIN:Nall} .if ${MK_STAGING} != "no" -.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*)) +.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*) && !make(*clean)) _SKIP_STAGING?= yes .endif .if ${_SKIP_STAGING:Uno} == "yes"