svn commit: r292239 - stable/10/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Tue Dec 15 01:19:21 UTC 2015


Author: bdrewery
Date: Tue Dec 15 01:19:19 2015
New Revision: 292239
URL: https://svnweb.freebsd.org/changeset/base/292239

Log:
  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

Added:
  stable/10/share/mk/local.sys.mk   (contents, props changed)

Added: stable/10/share/mk/local.sys.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/share/mk/local.sys.mk	Tue Dec 15 01:19:19 2015	(r292239)
@@ -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


More information about the svn-src-stable mailing list