On Wed, Jun 04, 2003 at 02:06:28AM -0400, Paul D. Smith wrote: > %% "Peschko, Edward" <[EMAIL PROTECTED]> writes: > > pe> How do you 'reach in and grab' a makefile variable, and then add > pe> to it? > > You can't, not that way. Command line settings, even if done with +=, > take complete precedence over makefile settings. You _can_ do this in > your makefile: > > override CFLAGS += -O > > then no matter what you add on the command line: > > make CFLAGS=-g > > you'll still get the values in the makefile. But if you use override > there's no way to override it from the command line. > > > Typically people reserve variables like CFLAGS, etc. for users to use > and don't set them inside their makefiles, but instead use other > variables for those, then include both in the compile line.
But that's the problem... 'typically' they do this. What if you don't control the makefile? That's no good - I want to be able to add to the defaults that people put *in* the makefile. Here's what I want to do: I want to develop a generic 'debug mode' for compiling my apps, where I can, on the fly, switch between a debugging version and a non-debugging one. And I don't want to have to modify every single Makefile in order to do it. Anyways, I propose the following syntax: CFLAGS = '$(CFLAGS) -g' to add to an existing CFLAGS entry inside a makefile, and append '-g'. I'm not sure if this is the right place to do it, though, and I don't see a developers mailing list. Where would you post feature requests? Ed _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
