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*/*)) && \