11.0-CURRENT SRC_ENV_CONF file vs. MAKEOBJDIRPREFIX in the file: they do not mix

Simon J. Gerraty sjg at juniper.net
Mon Dec 7 22:33:39 UTC 2015


Mark Millard <markmi at dsl-only.net> wrote:
> >> MAKEOBJDIRPREFIX=/usr/obj/xtoolchain
> > 
> > You should use ?= if you want this to work.
> > There are many places in Makefile.inc1 where MAKEOBJDIRPREFIX is tweaked
> > in the environment of a sub-make.
> > 
> > By using = above, you break that.
> 
> That presumes that MAKEOBJDIRPREFIX has not been assigned a default
> value before the SRC_ENV_CONF file has been included the first
> time.

Yes. If that's a concern:

.if ${.MAKE.LEVEL} == 0
MAKEOBJDIRPREFIX= /usr/obj/xtoolchain
.export MAKEOBJDIRPREFIX
.endif

will do what you want.


More information about the freebsd-current mailing list