On Tue, Apr 15, 2003 at 10:33:21AM -0400, Joe Nahmias wrote: > Christoph Berg wrote: > > On Tue, Apr 15, 2003 at 06:38:27AM -0300, Leo Costela Antunes wrote: > > > I'm setting CFLAGS to -g in case the DEBUG build option is set but then > > > running > > > $(MAKE) CFLAGS=$(CFLAGS) > > > inside the build target results in overridden variables. > > > From what I could find, the Makefile uses CFLAGS internally to store > > > pkg-config output. Is there a way to tell Make to append to the CFLAGS > > > variable? > > > > In the Makefile, try "CFLAGS += -your_options". > > > > Also, you can try "CFLAGS=$(CFLAGS) $(MAKE)" instead, as this will > > less-rigidly override the settings inside the Makefile. > I usually export the CFLAGS variable using "export CFLAGS" in > debian/rules after doing the preprocessing required by policy (setting > the optimization level, etc...). After that, it's just a matter of > making sure that upstream's makefile doesn't stomp on CFLAGS > unnecessarily (ie. they should use += instead of := or = ).
If it is using autotools, it is preferable to have configure set it using: ./configure CFLAGS=blah rather than setting the env var manually. See the autoconf manual or the goat book for details. Pete -- Pete Ryland http://pdr.cx/

