World broken in stage 1.1

Ruslan Ermilov ru at FreeBSD.org
Wed Aug 11 03:28:29 PDT 2004


Hi Peter,

On Wed, Aug 11, 2004 at 07:42:38PM +1000, Peter Jeremy wrote:
> On Wed, 2004-Aug-11 11:03:50 +0300, Ruslan Ermilov wrote:
> >Trying to set MAKEOBJDIRPREFIX in /etc/make.conf and attempting to buildworld
> >RELENG_4 on a 4.x machine similarly fails right away.
> 
> I have a script that run on RELENG_4 and does
> make MAKEOBJDIRPREFIX=/usr/obj/k7 CPUTYPE=k7 buildworld >buildworld.k7 2>&1 &
> make MAKEOBJDIRPREFIX=/usr/obj/i486 CPUTYPE=i486 buildworld >buildworld.i486 2>&1 &
> make MAKEOBJDIRPREFIX=/usr/obj/i586 CPUTYPE=i586/mmx buildworld >buildworld.i586 2>&1 &
> 
> This worked perfectly when I tried it on 1st August - at least the
> system compiled, installed and has been running since last weekend.  I
> have another -STABLE system that has MAKEOBJDIRPREFIX in
> /etc/make.conf and runs build{world,kernel} happily every night.  I
> admit I haven't tried using MAKEOBJDIRPREFIX on -CURRENT lately.
> 
> Overall, I find it annoying that it is no longer possible to embed all
> the buildworld customisations in /etc/make.conf.
> 
Did you read all my replies in this thread before posting this one?

MAKEOBJDIRPREFIX has always been an environment variable, it has never
been a command-line or global variable of make(1).  What you describe
should still work but in 4.x only (pass MAKEOBJDIRPREFIX as a command
line variable), but only because Makefile.inc1 will properly reset it
in environment.  This is not by design, it just *happens to work*
because Makefile.inc1 needs to reset MAKEOBJDIRPREFIX to different
values depending on the current stage of buildworld.

Last year, I changed make(1) in 5.x so it's possible to set
MAKEOBJDIR[PREFIX] as a command line variable, and have it really
work correctly (correctly == make will switch to this directory
and set .OBJDIR to point to it).  This is still discouraged, and
is not supported by a 4.x make(1).  Since make(1) was recently
change to propagate command line variables as command line variables
to sub-makes, passing MAKEOBJDIRPREFIX as a command-line variable
to buildworld will no longer work: command-line variables take
precedence over environment variables, so what Makefile.inc1
will set in environment will be ignored by buildworld substages.

So, the only One True Way to use MAKEOBJDIRPREFIX is as documented
in the make(1) manpage, i.e., set it as environment variable.

I will commit the enforcement into src/Makefile shortly.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040811/6d67dc7d/attachment.bin


More information about the freebsd-current mailing list