Pass all the flags when building `gen-scmconfig' in a cross-compile setup.
authorLudovic Courtès <ludo@gnu.org>
Mon, 14 Feb 2011 12:48:08 +0000 (13:48 +0100)
committerLudovic Courtès <ludo@gnu.org>
Mon, 14 Feb 2011 12:48:08 +0000 (13:48 +0100)
* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): When cross-compiling,
  pass all the CPPFLAGS and CFLAGS.

libguile/Makefile.am

index 79f886b..c06d9ea 100644 (file)
@@ -55,11 +55,13 @@ gen_scmconfig_SOURCES = gen-scmconfig.c
 ## Override default rule; this should be compiled for BUILD host.
 ## For some reason, OBJEXT does not include the dot
 gen-scmconfig.$(OBJEXT): gen-scmconfig.c
-       $(AM_V_GEN) \
-       if [ "$(cross_compiling)" = "yes" ]; then \
-               $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) -c -o $@ $<; \
-       else \
-               $(COMPILE) -c -o $@ $<; \
+       $(AM_V_GEN)                                                     \
+       if [ "$(cross_compiling)" = "yes" ]; then                       \
+               $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+                 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)     \
+                 -c -o $@ $<;                                          \
+       else                                                            \
+               $(COMPILE) -c -o $@ $<;                                 \
        fi
 
 ## Override default rule; this should run on BUILD host.