cleanworld only needs a tree walk if the expected .OBJDIR is .CURDIR.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Bryan Drewery 2017-11-11 01:10:08 +00:00
parent 781c4d47f2
commit f649ab27a3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325695

View file

@ -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