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
3407406588
commit
b284f32266
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325418
@ -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