Move makekeys to separate subdir
authorDan Nicholson <dbn.lists@gmail.com>
Thu, 22 Jan 2009 15:16:12 +0000 (07:16 -0800)
committerDan Nicholson <dbn.lists@gmail.com>
Thu, 19 Mar 2009 18:51:09 +0000 (11:51 -0700)
The build is a little cleaner when makekeys has its own Makefile.

configure.ac
src/.gitignore
src/Makefile.am
src/makekeys/.gitignore [new file with mode: 0644]
src/makekeys/Makefile.am [new file with mode: 0644]
src/makekeys/makekeys.c [moved from src/makekeys.c with 100% similarity]

index 093038f..9e13410 100644 (file)
@@ -77,5 +77,6 @@ AC_OUTPUT([
 Makefile
 include/Makefile
 src/Makefile
+src/makekeys/Makefile
 test/Makefile
 ])
index 2f94b37..1fd57cf 100644 (file)
@@ -1,3 +1,2 @@
 ks_tables.h
 libxkbcommon.la
-makekeys
index 309cc04..e0dde83 100644 (file)
@@ -1,13 +1,15 @@
-INCLUDES = -I$(top_srcdir)/include
+SUBDIRS = makekeys
 
-noinst_PROGRAMS = makekeys
-makekeys_CFLAGS = $(X11_CFLAGS)
-makekeys: CC = $(CC_FOR_BUILD)
+INCLUDES = -I$(top_srcdir)/include
 
 BUILT_SOURCES = ks_tables.h
-ks_tables.h: makekeys
+ks_tables.h: $(builddir)/makekeys/makekeys$(EXEEXT)
        @rm -f $@
-       cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | $(builddir)/makekeys$(EXEEXT) >$@
+       cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | \
+         $(builddir)/makekeys/makekeys$(EXEEXT) >$@
+
+$(builddir)/makekeys/makekeys$(EXEEXT):
+       @cd makekeys && $(MAKE) $(AM_MAKEFLAGS)
 
 lib_LTLIBRARIES = libxkbcommon.la
 libxkbcommon_la_CFLAGS = $(X11_CFLAGS)
diff --git a/src/makekeys/.gitignore b/src/makekeys/.gitignore
new file mode 100644 (file)
index 0000000..2bdb5e0
--- /dev/null
@@ -0,0 +1 @@
+makekeys
diff --git a/src/makekeys/Makefile.am b/src/makekeys/Makefile.am
new file mode 100644 (file)
index 0000000..95f9262
--- /dev/null
@@ -0,0 +1,6 @@
+INCLUDES = -I$(top_srcdir)/include
+
+# need to use build-native compiler
+CC = $(CC_FOR_BUILD)
+noinst_PROGRAMS = makekeys
+makekeys_CFLAGS = $(X11_CFLAGS)
similarity index 100%
rename from src/makekeys.c
rename to src/makekeys/makekeys.c