If MAKEOBJDIRPREFIX is a prefix match for .CURDIR, then __objdir is .CURDIR

Reviewed by:	bdrewery
This commit is contained in:
sjg 2017-04-18 23:59:15 +00:00
parent 4087477929
commit adc35d01f7

View File

@ -42,6 +42,10 @@ MKOBJDIRS= auto
# Use __objdir here so it is easier to tweak without impacting # Use __objdir here so it is easier to tweak without impacting
# the logic. # the logic.
.if !empty(MAKEOBJDIRPREFIX) .if !empty(MAKEOBJDIRPREFIX)
.if ${.CURDIR:M${MAKEOBJDIRPREFIX}/*} != ""
# we are already in obj tree!
__objdir?= ${.CURDIR}
.endif
__objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR} __objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR}
.endif .endif
__objdir?= ${MAKEOBJDIR:Uobj} __objdir?= ${MAKEOBJDIR:Uobj}