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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to