Use SRCTOP when defining ROOTOBJDIR

Excplicitly check rather than assume that .CURDIR is
a component of .OBJDIR
Otherwise check for OBJTOP and if that is a match use it.
This commit is contained in:
Simon J. Gerraty 2015-05-30 15:13:18 +00:00
parent 883e6bfbb1
commit 6332aaacb4

View File

@ -9,8 +9,12 @@
.include <src.opts.mk>
ROOTSRCDIR= ${.MAKE.MAKEFILES:M*/src.libnames.mk:H:H:H}
ROOTOBJDIR= ${.OBJDIR:S/${.CURDIR}//}${ROOTSRCDIR}
.if ${.OBJDIR:S,${.CURDIR},,} != ${.OBJDIR}
ROOTOBJDIR= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
.elif defined(OBJTOP) && ${.OBJDIR:M${OBJTOP}*} != ""
ROOTOBJDIR= ${OBJTOP}
.endif
_PRIVATELIBS= \
atf_c \
atf_cxx \