AUTO_OBJ: Allow 'make cleandir obj all' combinations.
The cleanobj target will not really remove the OBJDIR in this case, it will only remove the OBJDIR if only clean targets are ran. Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
9bd6f65470
commit
602b873130
@ -327,6 +327,10 @@ cleandepend:
|
||||
.endif
|
||||
.ORDER: cleandepend all
|
||||
.ORDER: cleandepend depend
|
||||
.if ${MK_AUTO_OBJ} == "yes"
|
||||
.ORDER: cleanobj depend
|
||||
.ORDER: cleandir depend
|
||||
.endif
|
||||
|
||||
.if !target(checkdpadd) && (defined(DPADD) || defined(LDADD))
|
||||
_LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g}
|
||||
|
@ -64,7 +64,8 @@ _SKIP_BUILD= not building at level 0
|
||||
${.TARGETS:M*install*} == ${.TARGETS} || \
|
||||
${.TARGETS:Mclean*} == ${.TARGETS} || \
|
||||
${.TARGETS:Mdestroy*} == ${.TARGETS} || \
|
||||
make(obj) || make(analyze) || make(print-dir)
|
||||
${.TARGETS:Mobj} == ${.TARGETS} || \
|
||||
make(analyze) || make(print-dir)
|
||||
# Skip building, but don't show a warning.
|
||||
_SKIP_BUILD=
|
||||
.endif
|
||||
|
@ -164,7 +164,8 @@ whereobj:
|
||||
.endif
|
||||
|
||||
# Same check in bsd.progs.mk
|
||||
.if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/)
|
||||
.if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/) && \
|
||||
(${MK_AUTO_OBJ} == "no" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} == "")
|
||||
cleanobj:
|
||||
-rm -rf ${CANONICALOBJDIR}
|
||||
.else
|
||||
@ -188,6 +189,10 @@ clean:
|
||||
.endif
|
||||
.endif
|
||||
.ORDER: clean all
|
||||
.if ${MK_AUTO_OBJ} == "yes"
|
||||
.ORDER: cleanobj all
|
||||
.ORDER: cleandir all
|
||||
.endif
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user