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.

_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to