cvs commit: src/usr.bin/make Makefile main.c nonints.h var.c

Jun Kuriyama kuriyama at imgsrc.co.jp
Sun Aug 8 22:12:33 PDT 2004


At Tue, 3 Aug 2004 18:56:31 +0000 (UTC),
Hartmut Brandt wrote:
>   Log:
>   Put variable assignments from the command line into the MAKEFLAGS
>   variable as required by POSIX. This causes such variables to be
>   pushed into all sub-makes called by the make (except when the MAKEFLAGS
>   variable is explicitely changed in the sub-make's environment).
>   This makes them also mostly un-overrideable in sub-makes except on the
>   sub-make's command line. Therefor specifying 'make CC=icc' will cause
>   icc to be used as C compiler in all sub-makes no matter what the Makefiles
>   itself try to do to the CC variable.
>   
>   This patch also corrects the handling of the MFLAGS variable. MFLAGS
>   contains all the command line flags but not the command line variable
>   assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now
>   changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only).
>   Makefiles can use MFLAGS for their own purposes given that they do not
>   except MFLAGS to be undefined at the beginning and that they don't evaluate
>   .MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance,
>   but it is unfortunately heavily used by the X makefiles.

I'm using MAKEOBJDIRPREFIX as a make argument to build the world.
Please help about new make.

Firstly, my host environment has the latest make(1), and it is used to
start buildworld as:

# cd /work/HEAD/src
# make MAKEOBJDIRPREFIX=/work/HEAD/obj buildworld

In this situation, ${BMAKE} in src/Makefile.inc1 includes this
assignment:

> MAKEFLAGS="-m /work/HEAD/src/tools/build/mk -m /work/HEAD/src/share/mk MAKEOBJDIRPREFIX=/work/HEAD/obj"

But before your modification, this was:

> MAKEFLAGS="-m /work/HEAD/src/tools/build/mk -m /work/HEAD/src/share/mk "

Then now, stage 1.1 of buildworld is failing because installation of
libegacy.a was changed from:

> sh /work/HEAD/src/tools/install.sh -C -o root -g wheel -m 444 libegacy.a /work/HEAD/obj/work/HEAD/src/i386/legacy/usr/lib

to:

> sh /work/HEAD/src/tools/install.sh -C -o root -g wheel -m 444 libegacy.a /work/HEAD/obj/legacy/usr/lib

which is destination directory was changed by passing
$MAKEOBJDIRPREFIX to submake.

I don't know how Makefile.inc1 should be fixed, and how this affects
to the upgrading path for old environment users.


-- 
Jun Kuriyama <kuriyama at imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama at FreeBSD.org> // FreeBSD Project


More information about the cvs-src mailing list