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.
AC_MSG_RESULT([$XF86KEYSYM_H])
AC_SUBST([XF86KEYSYM_H])
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])])
# 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])])
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(builddir)/makekeys
AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) $(XMALLOC_ZERO_CFLAGS)
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 \
lib_LTLIBRARIES = libxkbcommon.la
libxkbcommon_la_SOURCES = \
XKBcommonint.h \
alloc.c \
galloc.c \
atom.c \
alloc.c \
galloc.c \
atom.c \
# need to use build-native compiler
CC = $(CC_FOR_BUILD)
noinst_PROGRAMS = makekeys
# 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) > $@