build: do not override gnulib-provided AM_CFLAGS options
authorJim Meyering <meyering@redhat.com>
Mon, 11 Jan 2010 10:51:13 +0000 (11:51 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 11 Jan 2010 10:53:55 +0000 (11:53 +0100)
Avoid a warning from automake:
lib/Makefile.am:24: AM_CFLAGS multiply defined in condition TRUE ...
lib/gnulib.mk:30: ... `AM_CFLAGS' previously defined here
lib/Makefile.am:20:   `lib/gnulib.mk' included from here

* lib/Makefile.am (AM_CFLAGS): Append $(WARN_CFLAGS) and
$(WERROR_CFLAGS), i.e., use "+=", not "=".
This was introduced via 2009-12-17 commit 0341fc22,
"build: with --enable-gcc-warnings, use -Werror",
but fortunately is not a bug, because the definition
it would have overridden was always empty.

lib/Makefile.am

index e817fe72aaba51ca94bf2a13008b5201ba9da0db..6f4f55e183f2fe984c70715d68e4a6a7227544b4 100644 (file)
@@ -21,7 +21,7 @@ include gnulib.mk
 
 libgzip_a_LIBADD += $(LIBOBJS)
 libgzip_a_DEPENDENCIES += $(LIBOBJS)
-AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_CFLAGS += $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
 match.$(OBJEXT): match.c
        cp $(srcdir)/match.c _match.S