Add RELOBJTOP and RELSRCTOP for relative paths.

RELSRCTOP is likely not as useful since make will always be running from
inside of .OBJDIR and using something like ${.CURDIR}/${RELSRCTOP} is
not redundant for ${SRCTOP}.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Bryan Drewery 2017-10-31 00:07:41 +00:00
parent 635718c0d9
commit 95137b228e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325190

View File

@ -6,10 +6,14 @@
SRCTOP:= ${.PARSEDIR:tA:H:H}
.if ${.CURDIR} == ${SRCTOP}
RELDIR = .
RELDIR= .
RELTOP= .
.elif ${.CURDIR:M${SRCTOP}/*}
RELDIR := ${.CURDIR:S,${SRCTOP}/,,}
RELDIR:= ${.CURDIR:S,${SRCTOP}/,,}
.endif
RELTOP?= ${RELDIR:C,[^/]+,..,g}
RELOBJTOP?= ${RELTOP}
RELSRCTOP?= ${RELTOP}
# site customizations that do not depend on anything!
SRC_ENV_CONF?= /etc/src-env.conf