NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ.

Sponsored by:	Dell EMC
MFC after:	2 weeks
This commit is contained in:
Bryan Drewery 2020-04-07 17:07:04 +00:00
parent 1ff57e3a25
commit 33ae1ff723
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359705
2 changed files with 5 additions and 7 deletions

View file

@ -11,12 +11,10 @@ __<bsd.init.mk>__:
.include <bsd.opts.mk>
.-include "local.init.mk"
.if ${MK_AUTO_OBJ} == "yes"
# This is also done in bsd.obj.mk
.if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR}
.OBJDIR: ${.CURDIR}
.endif
.endif
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"

View file

@ -42,16 +42,16 @@
__<bsd.obj.mk>__:
.include <bsd.own.mk>
.if ${MK_AUTO_OBJ} == "yes"
# it is done by now
objwarn: .PHONY
obj: .PHONY
CANONICALOBJDIR= ${.OBJDIR}
# This is also done in bsd.init.mk
.if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR}
# but this makefile does not want it!
.OBJDIR: ${.CURDIR}
.endif
.if ${MK_AUTO_OBJ} == "yes"
# it is done by now
objwarn: .PHONY
obj: .PHONY
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*/*)) && \