help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: argument 'v=x' does not appear to work as in the manual ?


From: Mark Galeck (CW)
Subject: RE: argument 'v=x' does not appear to work as in the manual ?
Date: Fri, 26 Nov 2010 18:37:00 -0800

>Also remember that assignments on the command line happen FIRST, before
any makefile is read.  So your method does not work, because the
assignment of CFLAGS+=bar is processed before any makefile and so the
original value of CFLAGS is empty, then "bar" is added, and in addition
the CFLAGS variable is set to have "command line precedence".

Yes this explains the whole thing, thank you. 

>The GNU standards require that makefile authors reserve
all the standard variables for users via the command line, so that users
of any GNU-standard makefile can always run:

        make CFLAGS=-O2 CXXFLAGS=-O2 CPPFLAGS=-I/usr/local/include

I see.  Well, my users are used to "CFLAGS" being _all_ the flags, not just the 
"extra" ones, so I think I will go with "EXTRA_CFLAGS" or some such.  


Tell me, where are those "GNU Standards for makefiles" published?



> By the way, when somebody disagrees with me on makefiles, I say "Paul
> Smith would do it this way".  I hope you don't mind :)  

>Is that argumentum ad verecundiam?  :-)

No, I am not claiming that it _must_ be true because Paul says so.  I am just 
saying that it is highly likely to be true, and I want to end the argument.  

It works for 50% of users.  The other 50 % then ask, who is Paul Smith?  To 
which I replay "you  don't  know  who   Paul     Smith    is?"  - slowing down 
and accompanied by rolling eyes and look of astonishment - that takes care of 
the rest of them :)  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]