diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index 407d71c0161e..681a25b5ac97 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -10,6 +10,14 @@ ____: .include .-include "local.init.mk" + +.if ${MK_AUTO_OBJ} == "yes" +# This is also done in bsd.obj.mk +.if defined(NO_OBJ) +.OBJDIR: ${.CURDIR} +.endif +.endif + .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index 8283f6c809f1..d93e970af8a5 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -47,6 +47,7 @@ ____: objwarn: obj: CANONICALOBJDIR= ${.OBJDIR} +# This is also done in bsd.init.mk .if defined(NO_OBJ) # but this makefile does not want it! .OBJDIR: ${.CURDIR}