AUTO_OBJ: Don't create nested OBJDIRS with print-dir or make -n.

Sponsored by:	Dell EMC
This commit is contained in:
Bryan Drewery 2017-12-06 21:00:41 +00:00
parent 4783acf1f9
commit b00a5bd558
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326634

View file

@ -55,7 +55,8 @@ CANONICALOBJDIR= ${.OBJDIR}
# Handle special case where SRCS is full-pathed and requires
# nested objdirs. This duplicates some auto.obj.mk logic.
.if (!empty(SRCS:M*/*) || !empty(DPSRCS:M*/*)) && \
(${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "")
(${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "") && \
!make(print-dir) && empty(.MAKEFLAGS:M-[nN])
_wantdirs= ${SRCS:M*/*:H} ${DPSRCS:M*/*:H}
.if !empty(_wantdirs)
_wantdirs:= ${_wantdirs:O:u}