[Top][All Lists]

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

Re: AM_CFLAGS and sub/foo.c

From: Steve M. Robbins
Subject: Re: AM_CFLAGS and sub/foo.c
Date: Fri, 15 Jun 2001 00:42:58 -0400
User-agent: Mutt/1.3.18i

On Thu, Jun 14, 2001 at 06:51:09PM -0600, Tom Tromey wrote:
> >>>>> "Steve" == Steve M Robbins <address@hidden> writes:
> Steve> Given the following
> Steve>        bin_PROGRAMS = foo
> Steve>        foo_SOURCES = foo.c sub/foo2.c
> Steve> it turns out that "foo.c" is compiled using $(COMPILE), and hence
> Steve> includes AM_CFLAGS.  However, "foo2.c" is compiled *without*
> Steve> AM_CFLAGS.
> Thanks for noticing this!
> What I intended is that by default everything is compiled with
> AM_CFLAGS.  But if there are per-executable CFLAGS in effect, then
> AM_CFLAGS is omitted.  So I agree you've found a bug.
> Your message, plus my recent adventures into automake.texi, make me
> wonder if this is the best approach.  It would certainly be easier to
> document if AM_CFLAGS was simply always used.
> Now is the time to decide this sort of thing -- before 1.5 goes out.
> Any comments?  Reasons to prefer one over the other?  As I recall I
> planned it this way on the theory that adding AM_CFLAGS to the per-exe
> CFLAGS is easy for the user, but removing it would be hard.

So what you are saying is that AM_CFLAGS and foo_CFLAGS will behave
like LDADD and foo_LDADD (i.e. setting the foo_ version overrides the

I've always found this a bit of a nuisance with LDADD, to be honest.
I normally want the program-specific flags _in addition_ to the
generic flags.  So I *always* have $(LDADD) in $foo_LDADD.

I see that you've already checked in a fix: thanks!


by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants

reply via email to

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