aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2017-11-11 01:10:08 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2017-11-11 01:10:08 +0000
commitf649ab27a3876910078213430af38ef0bce98c5a (patch)
treeecddef16647279e37e062feb69f5cd2b36f3997c /Makefile.inc1
parent781c4d47f283dac2dc2000a4211b27529c2e0bf3 (diff)
Notes
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc13
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 8bc825d4606b..cc1c4832b403 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2814,7 +2814,8 @@ cleanworld cleanuniverse: .PHONY
-chflags -R 0 ${BW_CANONICALOBJDIR}
rm -rf ${BW_CANONICALOBJDIR}*
.endif
-.if make(cleanworld) && ${MK_AUTO_OBJ} == "no"
+.if make(cleanworld) && ${MK_AUTO_OBJ} == "no" && \
+ (empty(BW_CANONICALOBJDIR) || ${.CURDIR:tA} == ${BW_CANONICALOBJDIR:tA})
.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
# To be safe in this case, fall back to a 'make cleandir'
${_+_}@cd ${.CURDIR}; ${MAKE} cleandir