svn commit: r283767 - head/share/mk
Simon J. Gerraty
sjg at FreeBSD.org
Sat May 30 15:08:52 UTC 2015
Author: sjg
Date: Sat May 30 15:08:52 2015
New Revision: 283767
URL: https://svnweb.freebsd.org/changeset/base/283767
Log:
Define SRCTOP in src.sys.mk
Because src.sys.mk should only ever be found in the src tree
we can use its position (.PARSEDIR) to set SRCTOP.
Reviewed by: bapt, imp
Modified:
head/share/mk/src.sys.mk
Modified: head/share/mk/src.sys.mk
==============================================================================
--- head/share/mk/src.sys.mk Sat May 30 12:17:18 2015 (r283766)
+++ head/share/mk/src.sys.mk Sat May 30 15:08:52 2015 (r283767)
@@ -5,13 +5,16 @@
# to preserve historical (and useful) behavior. Changes here need to
# be reflected there so SRCCONF isn't included multiple times.
+# make sure this is defined in a consistent manner
+SRCTOP:= ${.PARSEDIR:tA:H:H}
+
# Allow user to configure things that only effect src tree builds.
SRCCONF?= /etc/src.conf
.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
-.include "${SRCCONF}"
+.sinclude "${SRCCONF}"
_srcconf_included_: .NOTMAIN
.endif
-# If we were found via .../share/mk we need to replace that in
+# If we were found via .../share/mk we need to replace that
# with ${.PARSEDIR:tA} so that we can be found by
# sub-makes launched from objdir.
.if ${.MAKEFLAGS:M.../share/mk} != ""
More information about the svn-src-head
mailing list