From 502304ef16ad2f65db138ea359714f2af196c3aa Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 7 Nov 2017 18:20:08 +0000 Subject: [PATCH] Reenable AUTO_OBJ by default. The problem with it was a bogus .OBJDIR in some cases where creation of object directories were purposely not attempted, such as for 'make cleandir' and in etc/ sub-directories. In these cases bmake would start with a bogus .OBJDIR like etc/ due to MAKEOBJDIR being a dynamic value based on .CURDIR, SRCTOP, and OBJTOP. OBJTOP would not yet be defined but is during early src.sys.obj.mk. That file and auto.obj.mk both were not modifying .OBJDIR unless they expected to create the objdir. Thus in these cases the .OBJDIR was left as etc/* rather than fixed to the proper .CURDIR. The issues were fixed in r325404 and r325416. An assertion to avoid the bad .OBJDIR was added in r325405. Sponsored by: Dell EMC Isilon --- share/mk/src.sys.obj.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk index 811a0ae20d40..6936f980bcbb 100644 --- a/share/mk/src.sys.obj.mk +++ b/share/mk/src.sys.obj.mk @@ -105,7 +105,7 @@ __objdir:= ${MAKEOBJDIR} # Try to enable MK_AUTO_OBJ by default if we can write to the __objdir. Only # do this if AUTO_OBJ is not disabled by the user, not cleaning, and this is # the first make ran. -.if 0 && ${.MAKE.LEVEL} == 0 && \ +.if ${.MAKE.LEVEL} == 0 && \ ${MK_AUTO_OBJ} == "no" && empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) && \ !defined(WITHOUT_AUTO_OBJ) && !make(showconfig) && !make(print-dir) && \ !defined(NO_OBJ) && \