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

Reviewed by:	bdrewery
This commit is contained in:
Simon J. Gerraty 2017-04-18 23:59:15 +00:00
parent ac30bca611
commit d86e8e9c57
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317106

View File

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