automake
[Top][All Lists]
Advanced

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

Bug with target specific CFLAGS


From: Richard Boulton
Subject: Bug with target specific CFLAGS
Date: Wed, 14 Feb 2001 10:46:19 +0000
User-agent: Mutt/1.2.5i

Hi,

For the GStreamer project (http://www.gstreamer.net/) I've got a
Makefile.am which uses target specific CFLAGS, and also has an automake
conditional to determine the source files to use.  This is generating a
functioning makefile, but each of the rules for generating a specific
target from a source file appears twice in the makefile, causing make to
emit warnings such as:

Makefile:1344: warning: overriding commands for target
`libgst_la-gstparse.lo'
Makefile:966: warning: ignoring old commands for target
`libgst_la-gstparse.lo'

If the conditional is removed, there is no longer any problem.

I've got a minimal example, in the form of a test case, which I attach to
this message.


PS: thanks for adding the _CFLAGS support: we've had some very nasty hacks
in place to do this.  We need specific _CFLAGS so that we can specify that
-O2 should be used for a particular target rather than -O6: the code is a
bit hairy (a cothreads implementation) and -O6 breaks it...  We want -O6
elsewhere though.

PPS: It would also be helpful if we could add specific flags _after_ the
standard CFLAGS - the current implementation adds them before.  We need the
-O2 to be at the end of the flags line, and I have therefore to clear the
default CFLAGS and set specific ones for both of my targets, viz:

  libcothreads_la_CFLAGS = $(CFLAGS) -O2
  libgst_la_CFLAGS = $(CFLAGS)
  CFLAGS =

Being able to do:
  libcothreads_la_POSTCFLAGS = -O2
would be neater (though the name is bad)...

-- 
Richard

Attachment: specflags6.test
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]