diff options
author | sjg <sjg@FreeBSD.org> | 2015-02-24 19:03:31 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2015-02-24 19:03:31 +0000 |
commit | 1d8fc87a83fd4e5b02f267fa7e231ebc5e70a3e0 (patch) | |
tree | 514e0962d1c05ddf65cc778f68670fa9d43bc0d9 /share | |
parent | a440d3c6946f1e8915cdd335eb020896cf1c57b4 (diff) | |
download | FreeBSD-src-1d8fc87a83fd4e5b02f267fa7e231ebc5e70a3e0.zip FreeBSD-src-1d8fc87a83fd4e5b02f267fa7e231ebc5e70a3e0.tar.gz |
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
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/src.sys.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk index 2682dca..78a0c23 100644 --- a/share/mk/src.sys.mk +++ b/share/mk/src.sys.mk @@ -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 |