Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jun 2014 17:03:58 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Warner Losh <imp@bsdimp.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers <src-committers@freebsd.org>, Andrey Chernov <ache@freebsd.org>
Subject:   Re: svn commit: r267758 - head
Message-ID:  <20140625000358.8769E580A2@chaos.localdomain>
In-Reply-To: <F92859FB-7BA1-41AC-BE27-28E1360B61F1@bsdimp.com>
References:  <201406230054.s5N0suIA081734@svn.freebsd.org> <256E890F-9564-4741-A5D8-89543381CF2D@gmail.com> <53A9B494.3020709@freebsd.org> <DF5BDC7F-70A9-4707-BAFD-0530C6134F61@bsdimp.com> <CF27A000-1187-469F-AD2C-88D2BDFF797F@bsdimp.com> <F92859FB-7BA1-41AC-BE27-28E1360B61F1@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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.




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