Use $(GCC_CFLAGS) for `-Werror' et al. so that it's not used to compile
authorLudovic Courtès <ludo@gnu.org>
Mon, 25 Aug 2008 09:20:02 +0000 (11:20 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 25 Aug 2008 20:11:53 +0000 (22:11 +0200)
Gnulib code.

ChangeLog
configure.in
libguile/ChangeLog
libguile/Makefile.am
srfi/ChangeLog
srfi/Makefile.am
test-suite/ChangeLog
test-suite/standalone/Makefile.am

index acbaccb..9d3c448 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-25  Ludovic Courtès  <ludo@gnu.org>
+
+       * configure.in (GCC_CFLAGS): New variable.  Store GCC flags like
+       `-Werror' inside it so that they are not used when compiling
+       Gnulib modules.
+
 2008-08-21  Ludovic Courtès  <ludo@gnu.org>
 
        * autogen.sh: Don't use `gnulib-tool', use the Gnulib files
index ede0d15..fcccb20 100644 (file)
@@ -1417,17 +1417,19 @@ case "$GCC" in
     ## less than exasperating.
     ## -Wpointer-arith was here too, but something changed in gcc/glibc
     ## and it became equally exasperating (gcc 2.95 and/or glibc 2.1.2).
-    CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
+    GCC_CFLAGS="-Wall -Wmissing-prototypes"
     # Do this here so we don't screw up any of the tests above that might
     # not be "warning free"
     if test "${GUILE_ERROR_ON_WARNING}" = yes
     then
-       CFLAGS="${CFLAGS} -Werror"
+       GCC_CFLAGS="${GCC_CFLAGS} -Werror"
        enable_compile_warnings=no
     fi
     ;;
 esac
 
+AC_SUBST(GCC_CFLAGS)
+
 ## If we're creating a shared library (using libtool!), then we'll
 ## need to generate a list of .lo files corresponding to the .o files
 ## given in LIBOBJS.  We'll call it LIBLOBJS.
index 518dcd4..a3c9767 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-25  Ludovic Courtès  <ludo@gnu.org>
+
+       * Makefile.am (AM_CFLAGS): New.
+       (guile_CFLAGS, libguile_la_CFLAGS): Use it.
+
 2008-08-20  Ludovic Courtès  <ludo@gnu.org>
 
        * eval.c, filesys.c, gc.c, numbers.c, stime.c, threads.c: Don't
index a68ebba..579ae89 100644 (file)
@@ -35,6 +35,8 @@ DEFAULT_INCLUDES =
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)                \
              -I$(top_srcdir)/lib -I$(top_builddir)/lib
 
+AM_CFLAGS = $(GCC_CFLAGS)
+
 ## The Gnulib Libtool archive.
 gnulib_library = $(top_builddir)/lib/libgnu.la
 
@@ -97,11 +99,11 @@ guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile
 
 
 guile_SOURCES = guile.c
-guile_CFLAGS = $(GUILE_CFLAGS)
+guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
 guile_LDADD = libguile.la
 guile_LDFLAGS = @DLPREOPEN@ $(GUILE_CFLAGS)
 
-libguile_la_CFLAGS = $(GUILE_CFLAGS)
+libguile_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
 
 libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
     chars.c continuations.c convert.c debug.c deprecation.c            \
index f35b25e..5cba7e7 100644 (file)
@@ -1,3 +1,7 @@
+2008-08-25  Ludovic Courtès  <ludo@gnu.org>
+
+       * Makefile.am (AM_CFLAGS): New.
+
 2008-06-28  Ludovic Courtès  <ludo@gnu.org>
 
        * Makefile.am (INCLUDES): Renamed to...
index 64858cd..bb69bbb 100644 (file)
@@ -29,6 +29,8 @@ DEFS = @DEFS@ @EXTRA_DEFS@
 AM_CPPFLAGS = -I.. -I$(srcdir)/..                              \
              -I$(top_srcdir)/lib -I$(top_builddir)/lib
 
+AM_CFLAGS = $(GCC_CFLAGS)
+
 srfiincludedir = $(pkgincludedir)/srfi
 
 # These headers are visible as <guile/srfi/mumble.h>
index 0d6b54c..1c2ff80 100644 (file)
@@ -1,3 +1,7 @@
+2008-08-25  Ludovic Courtès  <ludo@gnu.org>
+
+       * standalone/Makefile.am (test_cflags): Add `$(GCC_CFLAGS)'.
+
 2008-08-19  Ludovic Courtès  <ludo@gnu.org>
 
        * tests/goops.test (object update)[changing class, `hell' in
index ae68d5f..adbe0c8 100644 (file)
@@ -34,7 +34,7 @@ test_cflags =                                 \
   -I$(top_srcdir)/test-suite/standalone                \
   -I$(top_srcdir)                              \
   -I$(top_srcdir)/lib -I$(top_builddir)/lib    \
-  $(EXTRA_DEFS) $(GUILE_CFLAGS)
+  $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
 
 AM_LDFLAGS = $(GUILE_CFLAGS)