From 33ae1ff7230bc4244fe56918f6400933bace7ce9 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 7 Apr 2020 17:07:04 +0000 Subject: [PATCH] NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ. Sponsored by: Dell EMC MFC after: 2 weeks --- share/mk/bsd.init.mk | 2 -- share/mk/bsd.obj.mk | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index 62506e9887de..5cd435953bef 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -11,12 +11,10 @@ ____: .include .-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" diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index a1596285346a..816571970b64 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -42,16 +42,16 @@ ____: .include -.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*/*)) && \