Test that .CURDIR is component of (or matches) .OBJDIR

This commit is contained in:
Simon J. Gerraty 2015-05-30 17:27:52 +00:00
parent 3a3005dfdd
commit fdfa61c3ab

View File

@ -9,8 +9,8 @@
.include <src.opts.mk>
.if defined(MAKEOBJDIRPREFIX) && ${.OBJDIR:M${MAKEOBJDIRPREFIX}/*} != ""
ROOTOBJDIR= ${.OBJDIR:S/${.CURDIR}//}${SRCTOP}
.if ${.OBJDIR:S,${.CURDIR},,} != ${.OBJDIR}
ROOTOBJDIR= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
.elif defined(OBJTOP) && ${.OBJDIR:M${OBJTOP}*} != ""
ROOTOBJDIR= ${OBJTOP}
.endif