makekeys: fix cross-compilation makekeys must be built with the build-native compiler, not with $(CC) which is the cross-compiler. The only sane way to achieve this seems to be to use a separate Makefile.am for it. This patch fixes the problem apparently caused by: commit b5efe41f190cbb76eb1ca8ddf0c96990ddb83704 Author: Ran Benita <ran234@gmail.com> Date: Sat Mar 24 04:48:31 2012 +0200 Make build non-recursive There is no such thing as makekeys_makekeys_CC in automake. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/Makefile.am b/Makefile.am
index ac9cf8a..db4acc0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = makekeys
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xkbcommon.pc
@@ -87,16 +89,12 @@ BUILT_SOURCES = \
src/ks_tables.h
CLEANFILES = $(BUILT_SOURCES)
-noinst_PROGRAMS = makekeys/makekeys
-makekeys_makekeys_SOURCES = makekeys/makekeys.c
-makekeys_makekeys_CC = $(CC_FOR_BUILD)
-makekeys_makekeys_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
-makekeys_makekeys_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
-makekeys_makekeys_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
-
src/ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/makekeys/makekeys$(EXEEXT)
$(top_builddir)/makekeys/makekeys $(KEYSYMDEFS) > $@
+$(top_builddir)/makekeys/makekeys$(EXEEXT): $(top_srcdir)/makekeys/makekeys.c
+ $(MAKE) -C makekeys
+
# Tests
TESTS_ENVIRONMENT =
diff --git a/configure.ac b/configure.ac
index 04a737c..54bd6a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,5 +114,9 @@ AC_ARG_WITH([xkb_config_root],
[XKBCONFIGROOT="$xkb_base"])
AC_SUBST([XKBCONFIGROOT])
-AC_CONFIG_FILES([Makefile xkbcommon.pc])
+
+AC_CONFIG_FILES([
+ Makefile
+ makekeys/Makefile
+ xkbcommon.pc])
AC_OUTPUT
diff --git a/makekeys/Makefile.am b/makekeys/Makefile.am
new file mode 100644
index 0000000..bb93777
--- /dev/null
+++ b/makekeys/Makefile.am
@@ -0,0 +1,11 @@
+AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS)
+
+# need to use build-native compiler
+
+CC = $(CC_FOR_BUILD)
+CPPFLAGS = $(CPPFLAGS_FOR_BUILD)
+CFLAGS = $(CFLAGS_FOR_BUILD)
+LDFLAGS = $(LDFLAGS_FOR_BUILD)
+noinst_PROGRAMS = makekeys
+