From: Pekka Paalanen Date: Tue, 8 May 2012 08:46:58 +0000 (+0300) Subject: makekeys: fix cross-compilation X-Git-Tag: xkbcommon-0.2.0~601 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bdbb3ac455573413822f2314eb3ea9c76165991a;p=platform%2Fupstream%2Flibxkbcommon.git 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 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 --- 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 +