config: makekeys prog should stand alone in the makekeys directory
authorGaetan Nadon <memsize@videotron.ca>
Thu, 9 Dec 2010 21:22:17 +0000 (16:22 -0500)
committerGaetan Nadon <memsize@videotron.ca>
Sat, 18 Dec 2010 16:19:56 +0000 (11:19 -0500)
This program is a utility to generated a header file.
The header file it generates should not be located in the
directory where this utility program is compiled.

Move the /makekeys dir as a sibling of /src.
This reduces the number of bi-directional relationships
between directories.

Make corresponding makefiles simplifications.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Makefile.am
configure.ac
makekeys/.gitignore [new file with mode: 0644]
makekeys/Makefile.am [new file with mode: 0644]
makekeys/makekeys.c [moved from src/makekeys/makekeys.c with 100% similarity]
src/.gitignore [moved from src/makekeys/.gitignore with 57% similarity]
src/Makefile.am
src/makekeys/Makefile.am [deleted file]

index 4ad18e7..2a4d448 100644 (file)
@@ -1,4 +1,5 @@
-SUBDIRS = include src test
+# Order: makekeys before src
+SUBDIRS = include makekeys src test
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xkbcommon.pc
index 7f8f9fa..f8175ba 100644 (file)
@@ -99,8 +99,8 @@ AC_CONFIG_FILES([
        Makefile
        xkbcommon.pc
        include/Makefile
+       makekeys/Makefile
        src/Makefile
-       src/makekeys/Makefile
        src/xkbcomp/Makefile
        test/Makefile])
 AC_OUTPUT
diff --git a/makekeys/.gitignore b/makekeys/.gitignore
new file mode 100644 (file)
index 0000000..2bdb5e0
--- /dev/null
@@ -0,0 +1 @@
+makekeys
diff --git a/makekeys/Makefile.am b/makekeys/Makefile.am
new file mode 100644 (file)
index 0000000..75ed164
--- /dev/null
@@ -0,0 +1,5 @@
+AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS)
+
+# need to use build-native compiler
+CC = $(CC_FOR_BUILD)
+noinst_PROGRAMS = makekeys
similarity index 100%
rename from src/makekeys/makekeys.c
rename to makekeys/makekeys.c
similarity index 57%
rename from src/makekeys/.gitignore
rename to src/.gitignore
index 6251fb4..fe11434 100644 (file)
@@ -1,2 +1 @@
 ks_tables.h
-makekeys
index 7ae10de..9a77ece 100644 (file)
@@ -1,6 +1,6 @@
-SUBDIRS = makekeys xkbcomp
+SUBDIRS = xkbcomp
 
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(builddir)/makekeys
+AM_CPPFLAGS = -I$(top_srcdir)/include
 AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) $(XMALLOC_ZERO_CFLAGS)
 
 lib_LTLIBRARIES = libxkbcommon.la
@@ -22,3 +22,9 @@ libxkbcommon_la_SOURCES = \
        xkbgeom.h \
        xkbmisc.h \
        xkbrules.h
+
+BUILT_SOURCES = ks_tables.h
+CLEANFILES = $(BUILT_SOURCES)
+
+ks_tables.h: $(top_builddir)/makekeys/makekeys$(EXEEXT)
+       $(AM_V_GEN)cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | $(top_builddir)/makekeys/makekeys$(EXEEXT) > $@
diff --git a/src/makekeys/Makefile.am b/src/makekeys/Makefile.am
deleted file mode 100644 (file)
index 1847034..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS)
-
-# need to use build-native compiler
-CC = $(CC_FOR_BUILD)
-noinst_PROGRAMS = makekeys
-
-nodist_noinst_HEADERS = ks_tables.h
-CLEANFILES = ks_tables.h
-
-ks_tables.h: makekeys$(EXEEXT)
-       @rm -f $@
-       cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | $(builddir)/makekeys$(EXEEXT) > $@