Add SRCTOP and RELDIR support.
This is a direct commit to stable/10. It allows simpler MFCing from head where these are being used more frequently. Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
c6b624d1a1
commit
54d1dbbb2e
13
share/mk/local.sys.mk
Normal file
13
share/mk/local.sys.mk
Normal file
@ -0,0 +1,13 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.if defined(.PARSEDIR)
|
||||
SRCTOP:= ${.PARSEDIR:tA:H:H}
|
||||
.else
|
||||
SRCTOP:= ${.MAKE.MAKEFILES:M*/local.sys.mk:H:H:H}
|
||||
.endif
|
||||
|
||||
.if ${.CURDIR} == ${SRCTOP}
|
||||
RELDIR = .
|
||||
.elif ${.CURDIR:M${SRCTOP}/*}
|
||||
RELDIR := ${.CURDIR:S,${SRCTOP}/,,}
|
||||
.endif
|
Loading…
x
Reference in New Issue
Block a user