Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2015 19:03:32 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279247 - head/share/mk
Message-ID:  <201502241903.t1OJ3WDc076001@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Tue Feb 24 19:03:31 2015
New Revision: 279247
URL: https://svnweb.freebsd.org/changeset/base/279247

Log:
  If sys.mk were found via the magic path .../share/mk
  replace it with the absolute path of .PARSEDIR, so that sub-makes
  launched from objdirs (eg kernel) can still find the correct mk files.
  
  Reviewed by:	obrien

Modified:
  head/share/mk/src.sys.mk

Modified: head/share/mk/src.sys.mk
==============================================================================
--- head/share/mk/src.sys.mk	Tue Feb 24 18:40:10 2015	(r279246)
+++ head/share/mk/src.sys.mk	Tue Feb 24 19:03:31 2015	(r279247)
@@ -11,3 +11,13 @@ SRCCONF?=	/etc/src.conf
 .include "${SRCCONF}"
 _srcconf_included_:	.NOTMAIN
 .endif
+# If we were found via .../share/mk we need to replace that in
+# with ${.PARSEDIR:tA} so that we can be found by
+# sub-makes launched from objdir.
+.if ${.MAKEFLAGS:M.../share/mk} != ""
+.MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},}
+.endif
+.if ${MAKESYSPATH:Uno:M*.../*} != ""
+MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},}
+.export MAKESYSPATH
+.endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502241903.t1OJ3WDc076001>