src.sys.obj.mk: Export OBJTOP
If we had to set OBJTOP we want to .export it (if .MAKE.LEVEL > 0)
for the benefit of things like x!= ${.MAKE} -r ... and similar.
Without OBJTOP, the default MAKEOBJDIR setting will result in
attempting to use an objdir like /lib or /bin etc in some cases.
This patch is based on D30990
with the addition of the check for level > 0.
Reviewed by: jrtc27
Differential Revision: <https://reviews.freebsd.org/D30990>
This commit is contained in:
@@ -94,6 +94,9 @@ OBJTOP:= ${OBJROOT}${MACHINE}.${MACHINE_ARCH}
|
|||||||
# TARGET.TARGET_ARCH handled in OBJROOT already.
|
# TARGET.TARGET_ARCH handled in OBJROOT already.
|
||||||
OBJTOP:= ${OBJROOT:H}
|
OBJTOP:= ${OBJROOT:H}
|
||||||
.endif # ${MK_UNIFIED_OBJDIR} == "yes"
|
.endif # ${MK_UNIFIED_OBJDIR} == "yes"
|
||||||
|
.if ${.MAKE.LEVEL} > 0
|
||||||
|
.export OBJTOP
|
||||||
|
.endif
|
||||||
.endif # empty(OBJTOP)
|
.endif # empty(OBJTOP)
|
||||||
|
|
||||||
# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX.
|
# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX.
|
||||||
|
|||||||
Reference in New Issue
Block a user