Pass the CC variable to the example Makefiles
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 10 Jan 2014 21:39:05 +0000 (16:39 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 14 Jan 2014 14:40:56 +0000 (09:40 -0500)
Cross-compilation fails when using the --host configure option
since the cross-compiler is not invoked by the hand-made Makefiles
in doc/examples.

The CC variable must be passed explicitly to ensure the host's
default compiler is not invoked.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/Makefile.am
doc/examples/Makefile.examples.template

index 7687098187d6474395812f8b73fe018c6d915131..705e817d632ba4e1eb8d6e1f7189f322853ad1f8 100644 (file)
@@ -128,7 +128,7 @@ all-local:
                        cp -fR $(srcdir)/$$subdir $(builddir); \
                done; \
        fi
                        cp -fR $(srcdir)/$$subdir $(builddir); \
                done; \
        fi
-       $(MAKE) -f dist-files/Makefile AM_CPPFLAGS="$(CPPFLAGS) -I../../../urcu/ -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all
+       $(MAKE) -f dist-files/Makefile AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I../../../urcu/ -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all
 
 clean-local:
        $(MAKE) -f dist-files/Makefile $(AM_MAKEFLAGS) clean
 
 clean-local:
        $(MAKE) -f dist-files/Makefile $(AM_MAKEFLAGS) clean
index 4a0379ad88e82bbf3165e12a8c030743f45c0feb..6dd2baca623174da315f8b9d2a5b4064e302323a 100644 (file)
@@ -11,8 +11,8 @@
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifndef CC
-CC = gcc
+ifdef AM_CC
+CC = $(AM_CC)
 endif
 CFLAGS = -g -O2 -Wall
 
 endif
 CFLAGS = -g -O2 -Wall
 
This page took 0.025983 seconds and 4 git commands to generate.