Make build non-recursive

Unify all the different Makefile.am into a single short top level one
(the test/Makefile.am file is left intact though).

This makes the build system simpler to look and should encourage
unifying more currently-disparate code.

Some further motivation can be found in this page:
http://www.flameeyes.eu/autotools-mythbuster/automake/nonrecursive.html

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-03-24 04:48:31 +02:00 committed by Daniel Stone
parent 602e87805b
commit b5efe41f19
9 changed files with 82 additions and 88 deletions

2
.gitignore vendored
View File

@ -76,3 +76,5 @@ core
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
#
.dirstamp

View File

@ -1,5 +1,6 @@
# Order: makekeys before src
SUBDIRS = include makekeys src test
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = . test
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xkbcommon.pc
@ -15,3 +16,74 @@ ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
AM_CFLAGS = \
$(X11_CFLAGS) \
$(XORG_COMPILER_FLAGS) \
$(XMALLOC_ZERO_CFLAGS) \
-DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"'
AM_YFLAGS = -d
xkbcommonincludedir = $(includedir)/xkbcommon
xkbcommoninclude_HEADERS = include/xkbcommon/xkbcommon.h
lib_LTLIBRARIES = libxkbcommon.la
libxkbcommon_la_LDFLAGS = -no-undefined
libxkbcommon_la_SOURCES = \
src/xkbcomp/action.c \
src/xkbcomp/action.h \
src/xkbcomp/alias.c \
src/xkbcomp/alias.h \
src/xkbcomp/compat.c \
src/xkbcomp/expr.c \
src/xkbcomp/expr.h \
src/xkbcomp/indicators.c \
src/xkbcomp/indicators.h \
src/xkbcomp/keycodes.c \
src/xkbcomp/keycodes.h \
src/xkbcomp/keymap.c \
src/xkbcomp/keytypes.c \
src/xkbcomp/misc.c \
src/xkbcomp/misc.h \
src/xkbcomp/parseutils.c \
src/xkbcomp/parseutils.h \
src/xkbcomp/symbols.c \
src/xkbcomp/vmod.c \
src/xkbcomp/vmod.h \
src/xkbcomp/xkbcomp.c \
src/xkbcomp/xkbcomp.h \
src/xkbcomp/xkbparse.y \
src/xkbcomp/xkbpath.c \
src/xkbcomp/xkbpath.h \
src/xkbcomp/xkbscan.l \
src/alloc.c \
src/atom.c \
src/keysym.c \
src/malloc.c \
src/map.c \
src/maprules.c \
src/misc.c \
src/state.c \
src/text.c \
src/utils.c \
src/utils.h \
src/xkb.c \
src/xkballoc.h \
src/xkbmisc.h \
src/xkbrules.h \
src/XKBcommonint.h \
include/xkbcommon/xkbcommon.h
BUILT_SOURCES = src/xkbcomp/xkbparse.h src/ks_tables.h
CLEANFILES = src/ks_tables.h
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) > $@

View File

@ -29,7 +29,7 @@ AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
AM_MAINTAINER_MODE
# Initialize libtool
@ -104,11 +104,7 @@ AC_ARG_WITH([xkb_config_root],
AC_SUBST([XKBCONFIGROOT])
AC_CONFIG_FILES([
Makefile
xkbcommon.pc
include/Makefile
makekeys/Makefile
src/Makefile
src/xkbcomp/Makefile
test/Makefile])
Makefile
test/Makefile
xkbcommon.pc])
AC_OUTPUT

View File

@ -1 +0,0 @@
nobase_include_HEADERS = xkbcommon/xkbcommon.h

0
m4/.gitkeep Normal file
View File

View File

@ -1,9 +0,0 @@
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

View File

@ -1,31 +0,0 @@
SUBDIRS = xkbcomp
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) $(XMALLOC_ZERO_CFLAGS)
lib_LTLIBRARIES = libxkbcommon.la
libxkbcommon_la_LIBADD = xkbcomp/libxkbcomp.la
libxkbcommon_la_LDFLAGS = -no-undefined
libxkbcommon_la_SOURCES = \
XKBcommonint.h \
alloc.c \
atom.c \
keysym.c \
malloc.c \
map.c \
maprules.c \
misc.c \
state.c \
text.c \
utils.c \
utils.h \
xkb.c \
xkballoc.h \
xkbmisc.h \
xkbrules.h
BUILT_SOURCES = ks_tables.h
CLEANFILES = $(BUILT_SOURCES)
ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/makekeys/makekeys$(EXEEXT)
$(top_builddir)/makekeys/makekeys $(KEYSYMDEFS) > $@

View File

@ -1,35 +0,0 @@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) \
-DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"'
AM_YFLAGS = -d
noinst_LTLIBRARIES = libxkbcomp.la
libxkbcomp_la_SOURCES = \
action.c \
action.h \
alias.c \
alias.h \
compat.c \
expr.c \
expr.h \
indicators.c \
indicators.h \
keycodes.c \
keycodes.h \
keymap.c \
keytypes.c \
misc.c \
misc.h \
parseutils.c \
parseutils.h \
symbols.c \
vmod.c \
vmod.h \
xkbcomp.c \
xkbcomp.h \
xkbparse.y \
xkbpath.c \
xkbpath.h \
xkbscan.l
BUILT_SOURCES = xkbparse.h

View File

@ -1,6 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS)
LDADD = $(top_builddir)/src/libxkbcommon.la
AM_CFLAGS = $(X11_CFLAGS) $(XORG_COMPILER_FLAGS)
LDADD = $(top_builddir)/libxkbcommon.la
TESTS_ENVIRONMENT = $(SHELL)