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

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



>
> First of all, I would appreciate if somebody could give me a link to an
> authoritative documentation that explains that CXXFLAGS (and others)
> should be expected to be changed to local values by the user. It seems
> to me that many upstream authors ignore this fact and write makefiles
> that will not work well if CXXFLAGS is changed to the Debian standard
> values. (In exchange for the link, I will update
> http://wiki.debian.org/GettingPackaged accordingly).


Hi Charles,

http://www.gnu.org/software/automake/manual/make/Implicit-Rules.html#Implicit-Rules

I am curious what other DD's do. As for me, I usually try to save the
original "default" CFLAGS, CXXFLAGS, and LDFLAGS before I change them.
 Usually something like:
OLDCFLAGS=$(CFLAGS)
CFLAGS=-W...
then I can change CFLAGS however and use OLDCFLAGS to get the old
settings reliably.

Cheers,

Rudi

>
> For Proda, I would like to submit a change upstream, such as something
> like:
>
> OTHERFLAGS = -DVERSION="\"1.00\""
> CXXFLAGS = -g -W -Wall -pedantic
>
> proda : $(OBJECTS)
>        $(CXX) $(CXXFLAGS) $(OTHERFLAGS) -lm $(OBJECTS) -o proda
>
> Unfortunately, $(OBJECTS) is a long list of .o files, each built by
> implicit rules like:
>
> foo.o: bar.h baz.h
> toto.o : tata.h
> anotherone.o : baz.h tutu.h
> etc...
>
> 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 ?
>
> Have a nice day,
>
> --
> Charles Plessy
> Debian-Med packaging team
> Tsurumi, Kanagawa, Japan
>
>
> --
> To UNSUBSCRIBE, email to debian-med-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>



-- 
Git, Hg (Mercurial), and Subversion (svn) hosting over SSH
http://sshcontrol.com/


Reply to: