Fix top-level targets with read-only OBJDIR.
This also makes it so that top-level build targets do not immediately create the OBJDIR. Only sub-make targets will do so. This avoids creating object directories for targets like 'make check-old' or creating unneeded MACHINE.MACHINE_ARCH directories during 'make tinderbox'. Reported by: npn, lifanov Tested by: npn, Mark Millard Sponsored by: Dell
This commit is contained in:
parent
022d069e76
commit
b4647f4228
@ -33,6 +33,11 @@ _CAN_USE_AUTO_OBJ?= yes
|
|||||||
.if !defined(_CAN_USE_AUTO_OBJ)
|
.if !defined(_CAN_USE_AUTO_OBJ)
|
||||||
_MAKEARGS+= MK_AUTO_OBJ=no
|
_MAKEARGS+= MK_AUTO_OBJ=no
|
||||||
MK_AUTO_OBJ= no
|
MK_AUTO_OBJ= no
|
||||||
|
# This will prevent src.sys.obj.mk from opportunistically enabling AUTO_OBJ
|
||||||
|
# in this make execution and for sub-makes. For all of these targets we
|
||||||
|
# just want to read any existing OBJDIR but we don't care if we can create
|
||||||
|
# or write to them.
|
||||||
|
.MAKEOVERRIDES+= MK_AUTO_OBJ
|
||||||
.endif
|
.endif
|
||||||
.endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ)
|
.endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ)
|
||||||
|
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
# TARGET.TARGET_ARCH added in as it assumes that MAKEOBJDIRPREFIX is
|
# TARGET.TARGET_ARCH added in as it assumes that MAKEOBJDIRPREFIX is
|
||||||
# nested in the existing OBJTOP with TARGET.TARGET_ARCH in it.
|
# nested in the existing OBJTOP with TARGET.TARGET_ARCH in it.
|
||||||
#
|
#
|
||||||
|
# The expected OBJDIR is stored in __objdir for auto.obj.mk to use.
|
||||||
|
#
|
||||||
|
# AUTO_OBJ is opportunistically enabled if the computed .OBJDIR is writable
|
||||||
|
# by the current user. Some top-level targets disable this behavior in
|
||||||
|
# Makefile.sys.inc.
|
||||||
|
#
|
||||||
|
|
||||||
_default_makeobjdirprefix?= /usr/obj
|
_default_makeobjdirprefix?= /usr/obj
|
||||||
_default_makeobjdir= $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},}
|
_default_makeobjdir= $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},}
|
||||||
|
Loading…
Reference in New Issue
Block a user