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

Harti Brandt harti at freebsd.org
Wed Aug 4 03:25:23 PDT 2004


On Wed, 4 Aug 2004, Alexander Leidinger wrote:

AL>On Tue, 3 Aug 2004 18:56:31 +0000 (UTC)
AL>Hartmut Brandt <harti at freebsd.org> wrote:
AL>
AL>> harti       2004-08-03 18:56:31 UTC
AL>> 
AL>>   FreeBSD src repository
AL>> 
AL>>   Modified files:
AL>>     usr.bin/make         Makefile main.c nonints.h var.c 
AL>>   Log:
AL>>   Put variable assignments from the command line into the MAKEFLAGS
AL>>   variable as required by POSIX. This causes such variables to be
AL>>   pushed into all sub-makes called by the make (except when the MAKEFLAGS
AL>>   variable is explicitely changed in the sub-make's environment).
AL>>   This makes them also mostly un-overrideable in sub-makes except on the
AL>>   sub-make's command line. Therefor specifying 'make CC=icc' will cause
AL>>   icc to be used as C compiler in all sub-makes no matter what the Makefiles
AL>>   itself try to do to the CC variable.
AL>
AL>Yeah!
AL>
AL>Does this mean I can override the CFLAGS from make.conf now with 'make
AL>"CFLAGS=foo bar"'?

Yes, that should work. Note also that you cannot do 'cd /usr/src/usr.bin ;
make SUBDIR="last leave"' anymore.

AL>Does this also apply to environment variables (CFLAGS="foo bar" make)?

No. Environment variables have lowest priority - command line variables
and makefiles override them. But you should be able to say
CFLAGS="foo bar" make -E CFLAGS to move up CFLAGS in the priority list.

harti


More information about the cvs-src mailing list