This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: AM_CFLAGS and sub/foo.c
- To: "Steve M. Robbins" <steven dot robbins at videotron dot ca>
- Subject: Re: AM_CFLAGS and sub/foo.c
- From: Tom Tromey <tromey at redhat dot com>
- Date: 14 Jun 2001 18:51:09 -0600
- Cc: GNU Automake List <automake at gnu dot org>
- List-Id: Discussion list for automake <automake.gnu.org>
- References: <20010613191734.E18242@nyongwa.montreal.qc.ca>
- Reply-To: tromey at redhat dot com
>>>>> "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