diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-12-15 01:19:19 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-12-15 01:19:19 +0000 |
commit | 54d1dbbb2e0a9d77a49858deb67e7f9c8d854165 (patch) | |
tree | 5827444ab43888596723d4564d222aa730c6169e | |
parent | c6b624d1a15051048c564b8cc8b87ea21664b1c8 (diff) | |
download | FreeBSD-src-54d1dbbb2e0a9d77a49858deb67e7f9c8d854165.zip FreeBSD-src-54d1dbbb2e0a9d77a49858deb67e7f9c8d854165.tar.gz |
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
-rw-r--r-- | share/mk/local.sys.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk new file mode 100644 index 0000000..d379e8f --- /dev/null +++ b/share/mk/local.sys.mk @@ -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 |