Move ks_tables.h build into makekeys subdirectory

This avoids the BUILT_SOURCES weirdness and forcing the build into the
makekeys subdirectory. Added a new make variable KS_HEADERS that lists
all the keysym headers we're going to parse.
master
Dan Nicholson 2009-03-26 06:50:33 -07:00
parent 4859304f65
commit f4d8e2932c
3 changed files with 10 additions and 11 deletions

View File

@ -67,6 +67,8 @@ test -f "$XF86KEYSYM_H" || AC_MSG_ERROR([can't locate XF86keysym.h in $x11includ
AC_MSG_RESULT([$XF86KEYSYM_H])
AC_SUBST([XF86KEYSYM_H])
AC_SUBST([KS_HEADERS], ['$(KEYSYMDEF_H) $(XF86KEYSYM_H)'])
# Require xorg-macros version 1.2.0 or newer for XORG_CHANGELOG macro
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros before running autoconf/autogen.sh])])

View File

@ -1,21 +1,11 @@
SUBDIRS = makekeys
INCLUDES = -I$(top_srcdir)/include
INCLUDES = -I$(top_srcdir)/include -I$(builddir)/makekeys
AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) $(XMALLOC_ZERO_CFLAGS)
BUILT_SOURCES = ks_tables.h
ks_tables.h: $(builddir)/makekeys/makekeys$(EXEEXT)
@rm -f $@
cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | \
$(builddir)/makekeys/makekeys$(EXEEXT) >$@
$(builddir)/makekeys/makekeys$(EXEEXT):
@cd makekeys && $(MAKE) $(AM_MAKEFLAGS)
lib_LTLIBRARIES = libxkbcommon.la
libxkbcommon_la_SOURCES = \
XKBcommonint.h \
ks_tables.h \
alloc.c \
galloc.c \
atom.c \

View File

@ -4,3 +4,10 @@ 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 $(KS_HEADERS) | $(builddir)/makekeys$(EXEEXT) > $@