svn commit: r267758 - head

Simon J. Gerraty sjg at juniper.net
Wed Jun 25 00:05:35 UTC 2014


On Tue, 24 Jun 2014 15:25:45 -0700, Warner Losh writes:
>>>>>> Change suggestion how to set MAKESYSPATH as broken incremental =
>build
>>>>>> workaround. Magic ".../share/mk" (search directories up to /)

If syspath is going to include .../ it isn't a bad idea for
sys.mk to resolve it.
Something like:

.if ${.MAKE.LEVEL} == 0
# just in case -m, MAKESYSPATH or our default has .../ 
# export a sanitised version...
# first any -m* from command line,
# then any MAKESYSPATH and finally ${.PARSEDIR}
_makesyspath:= ${.MAKEFLAGS:tW:S/ -m / -m/g:tw:M-m*:S,^-m,,} \
        ${MAKESYSPATH:U} \
        ${.PARSEDIR}
# replace .../.* with ${.PARSEDIR}, not perfect but pretty close
MAKESYSPATH:= ${_makesyspath:S,:, ,g:C,^\.\.\./.*,${.PARSEDIR},:u:ts:}
.export MAKESYSPATH
.endif

then if a sub-make is launched in a objdir outside of the tree, it will
still find the correct sys.mk etc.



More information about the svn-src-head mailing list