On Mon, 2004-04-19 at 09:23, Erik de Castro Lopo wrote: > On Mon, 19 Apr 2004 09:50:55 +1000 > Conrad Parker <[EMAIL PROTECTED]> wrote: > > packages using automake should only set AM_CFLAGS, AM_INCLUDES, AM_LDFLAGS > > etc. in Makefile.am. Resetting CFLAGS, INCLUDES, LDFLAGS etc. is a bug > > (which I've also been guiltly of many times :) > > I often do: > > CFLAGS="$CFLAGS -Wall-sorts-of-warnings" > > Is that OK? Note that it only appends stuff the CFLAGS, it does not modify > stuff that is already there. >
It potentially _does_ modify stuff that is already there. If someone puts a '-w' (inhibit all warning messages) in CFLAGS your '-Wall' will result in the opposite. The last occurrence of an option on the command line counts so CFLAGS="-Wall-sourts-of-warnings $CFLAGS" would be better but it still does not meet automake's rules of not touching user variables. Stuff like warnings are not really evil but imagine you'd append a '-O3' this way. It would no longer be possible to make sure that the compiler does not apply any optimization by calling 'make CFLAGS=-O0'. So if you asked me I'd say yes, it's still a bug. :) Jan