This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AM_CFLAGS and sub/foo.c


>>>>> "Steve" == Steve M Robbins <steven.robbins@videotron.ca> writes:

Steve> Given the following Makefile.am
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.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]