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

Re: Lame Makefile problem



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 = ).

Joe Nahmias, DD wannabe



Reply to: