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

Re: Problem with implicit rule for .o files and overriding of CXXFLAGS.



Sorry for the CC. I was away and missed the discussion :)

Am Mittwoch, den 25.06.2008, 13:24 +0900 schrieb Charles Plessy:

> while working on an update to the `proda' package, I realised that a
> compilation option, DVERSION="\"1.00\"", was discarded during the build
> of the Debian binary package. The reason is very simple:
> 
> OTHERFLAGS = -DVERSION="\"1.00\""
> CXXFLAGS = -g -W -Wall -pedantic $(OTHERFLAGS)

Talk to the upstream author to use e.g. (GNU make specific):

override CXXFLAGS += $(OTHERFLAGS)

or tell him to better use one of the following:

DEFS += -DVERSION="\"1.00\""
AM_CPPFLAGS += -DVERSION="\"1.00\""
foo_CPPFLAGS += -DVERSION="\"1.00\""
...

These are normnally not overwritten by the user and the correct place to
leave a -D switch. There is enough documentation out there to find the
correct solution.

[..]
> My problem is that I do not know the contents of the implicit rule
> building the .o files from the .h files, nor how I can tell to make to
> add $(OTHERFLAGS) to this implicite rule.
[..]
> Any idea ?

Read /usr/share/doc/make-doc/. There you find all built-in rules.

(Sorry, if you already got this information - I'm still
receiving/processing mails).

Regards, Daniel


Reply to: