Validate MAKEOBJDIR after the MAKEOBJDIRPREFIX override.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Bryan Drewery 2017-11-05 00:12:02 +00:00
parent aba77ddd8a
commit dea21cf465

View File

@ -77,13 +77,6 @@ OBJTOP:= ${OBJROOT}${TARGET:D${TARGET}.${TARGET_ARCH}:U${MACHINE}.${MACHINE_ARCH
OBJTOP:= ${OBJROOT:H}
.endif # ${MK_UNIFIED_OBJDIR} == "yes"
# Wait to validate MAKEOBJDIR until OBJTOP is set.
.if defined(MAKEOBJDIR)
.if ${MAKEOBJDIR:M/*} == ""
.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}'
.endif
.endif
# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone
# for DIRDEPS_BUILD which really wants to know the absolute top at
# all times. This intenionally comes after adding TARGET.TARGET_ARCH
@ -94,6 +87,13 @@ OBJTOP:= ${MAKEOBJDIRPREFIX}${SRCTOP}
OBJROOT:= ${OBJTOP}/
.endif
# Wait to validate MAKEOBJDIR until OBJTOP is set.
.if defined(MAKEOBJDIR)
.if ${MAKEOBJDIR:M/*} == ""
.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}'
.endif
.endif
# Try to enable MK_AUTO_OBJ by default if we can write to the OBJROOT. Only
# do this if AUTO_OBJ is not disabled by the user, not cleaning, and this
# is the first make ran.