Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2015 13:33:05 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        "Simon J. Gerraty" <sjg@juniper.net>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: 11.0-CURRENT SRC_ENV_CONF file vs. MAKEOBJDIRPREFIX in the file: they do not mix
Message-ID:  <D5A9EE24-519D-4870-9370-64FB826130DA@dsl-only.net>
In-Reply-To: <2426.1449521335@chaos>
References:  <A9ECA670-0B14-455E-BB22-7B546CE182CB@dsl-only.net> <2426.1449521335@chaos>

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

> On 2015-Dec-7, at 12:48 PM, Simon J. Gerraty <sjg@juniper.net> wrote:
>=20
> Mark Millard <markmi@dsl-only.net> wrote:
>> My guess is that it is picking up the
>>=20
>> MAKEOBJDIRPREFIX=3D/usr/obj/xtoolchain
>=20
> You should use ?=3D if you want this to work.
> There are many places in Makefile.inc1 where MAKEOBJDIRPREFIX is =
tweaked
> in the environment of a sub-make.
>=20
> By using =3D 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. If =
MAKEOBJDIRPREFIX had been defined already then the ?=3D would do nothing =
and the wrong value would be used.

I believe that the following trace shows that such an assignment of a =
default value does happen first, making ?=3D not work either.



/usr/src/Makefile (head/Makefile 29160) has

> MAKEOBJDIRPREFIX?=3D      /usr/obj

at line 145 (used when it is not using targets/Makefile from the =
relevant .if/.else/.endif).

Line 105 has .include <bsd.compiler.mk> and there no others before the =
above assignment. bsd.compiler.mk in turn includes bsd.opt.mk (only), =
which in turns includes bsd.mkopt.mk (only). That in turn includes =
nothing else. So these files and only these files are the involved files =
before that assignment as far as I can tell.

None of these get to src.sys.env.mk and so SRC_ENV_CONF use has not =
happened yet when=20

> MAKEOBJDIRPREFIX?=3D      /usr/obj

is executed.

So, if I understand right, MAKEOBJDIRPREFIX is already defined before =
the code

> SRC_ENV_CONF?=3D /etc/src-env.conf
> .if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_)
> .-include "${SRC_ENV_CONF}"
> _src_env_conf_included_:        .NOTMAIN
> .endif

is executed and so using ?=3D would not be effective in the included =
file.

Did I miss something?



=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D5A9EE24-519D-4870-9370-64FB826130DA>