atom: allow passing NULLs to find_node_pointer()
[platform/upstream/libxkbcommon.git] / Makefile.am
index f7e7fb1..0d13625 100644 (file)
@@ -3,6 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xkbcommon.pc
 
+EXTRA_DIST = \
+       makekeys.py \
+       src/xkbcomp/keywords.gperf
+
 AM_CPPFLAGS = \
        -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
        -I$(top_srcdir)/src \
@@ -12,8 +16,9 @@ AM_CPPFLAGS = \
 
 AM_CFLAGS = $(BASE_CFLAGS)
 
-AM_LFLAGS = -o lex.yy.c
-AM_YFLAGS = -d
+AM_LDFLAGS = -no-undefined
+
+AM_YFLAGS = -d -p _xkbcommon_
 
 xkbcommonincludedir = $(includedir)/xkbcommon
 xkbcommoninclude_HEADERS = \
@@ -23,7 +28,6 @@ xkbcommoninclude_HEADERS = \
        xkbcommon/xkbcommon-names.h
 
 lib_LTLIBRARIES = libxkbcommon.la
-libxkbcommon_la_LDFLAGS = -no-undefined
 libxkbcommon_la_SOURCES = \
        src/xkbcomp/action.c \
        src/xkbcomp/action.h \
@@ -38,11 +42,13 @@ libxkbcommon_la_SOURCES = \
        src/xkbcomp/keycodes.c \
        src/xkbcomp/keymap.c \
        src/xkbcomp/keymap-dump.c \
+       src/xkbcomp/keywords.c \
        src/xkbcomp/parser.y \
        src/xkbcomp/parser-priv.h \
        src/xkbcomp/rules.c \
        src/xkbcomp/rules.h \
-       src/xkbcomp/scanner.l \
+       src/xkbcomp/scanner.c \
+       src/xkbcomp/scanner-utils.h \
        src/xkbcomp/symbols.c \
        src/xkbcomp/types.c \
        src/xkbcomp/vmod.c \
@@ -64,17 +70,16 @@ libxkbcommon_la_SOURCES = \
        src/state.c \
        src/text.c \
        src/text.h \
+       src/utils.c \
        src/utils.h
 
 BUILT_SOURCES = \
        src/xkbcomp/parser.c \
-       src/xkbcomp/parser.h \
-       src/xkbcomp/scanner.c
+       src/xkbcomp/parser.h
 CLEANFILES = $(BUILT_SOURCES)
 
 src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
 src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
-src/xkbcomp/scanner.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
 
 # Documentation
 
@@ -106,8 +111,8 @@ endif ENABLE_DOCS
 
 # Some tests need to use unexported symbols, so we link them against
 # a private copy of libxkbcommon with all symbols exposed.
-noinst_LTLIBRARIES = libtest.la
-libtest_la_LDFLAGS = $(libxkbcommon_la_LDFLAGS)
+check_LTLIBRARIES = libtest.la
+libtest_la_CFLAGS = $(AM_CLFLAGS) -fvisibility=default
 libtest_la_SOURCES = \
        $(libxkbcommon_la_SOURCES) \
        test/common.c \
@@ -162,14 +167,13 @@ check_PROGRAMS += \
 
 endif BUILD_LINUX_TESTS
 
-EXTRA_DIST = \
+EXTRA_DIST += \
        test/data
 
 # This sed script strips out lines that start with '#define _' which
 # removes #define _OSF_Keysyms and such.  The XK_Ydiaeresis case is to
 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
 # not already defined.
-
 X11_INCLUDEDIR = /usr/include/X11
 KEYSYMDEFS = \
         $(X11_INCLUDEDIR)/keysymdef.h \
@@ -189,6 +193,11 @@ update-keysyms:
        echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' > $(top_srcdir)/src/ks_tables.h
        LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h >> $(top_srcdir)/src/ks_tables.h
 
+# Run this if you add/remove a new keyword to the xkbcomp scanner,
+# or just want to regenerate the gperf file.
+update-keywords:
+       $(AM_V_GEN)gperf < $(top_srcdir)/src/xkbcomp/keywords.gperf > $(top_srcdir)/src/xkbcomp/keywords.c
+
 # Android stuff
 
 Android_build.mk: Makefile $(BUILT_SOURCES)
@@ -200,7 +209,7 @@ Android_build.mk: Makefile $(BUILT_SOURCES)
        -:TAGS eng debug \
        -:SOURCES $(filter-out %.l %.y,$(libxkbcommon_la_SOURCES)) $(BUILT_SOURCES) \
        -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) \
-       -:LDFLAGS $(libxkbcommon_la_LDFLAGS) \
+       -:LDFLAGS $(AM_LDFLAGS) \
        \
        -:PASSTHROUGH 'libxkbcommon-clean: clean-libxkbcommon' \
        > $@