diff --git a/Makefile.am b/Makefile.am index 0501997..a22bd7a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,8 +4,10 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xkbcommon.pc EXTRA_DIST = \ - makekeys.py \ - makeheader.py \ + scripts/makeheader \ + scripts/makekeys \ + scripts/update-keysyms \ + scripts/update-keywords \ src/xkbcomp/keywords.gperf \ test/data \ README.md \ @@ -314,21 +316,6 @@ bench_rules_LDADD = $(BENCH_LDADD) bench_rulescomp_LDADD = $(BENCH_LDADD) bench_compose_LDADD = $(BENCH_LDADD) -## -# Custom targets -## - -# Run this to regenerate xkbcommon-keysyms.h from the X11 headers -# defining the keysyms and update the name <-> keysym mapping. -update-keysyms: - LC_CTYPE=C python $(top_srcdir)/makeheader.py > $(top_srcdir)/xkbcommon/xkbcommon-keysyms.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 ## diff --git a/PACKAGING b/PACKAGING index d848b58..b14101a 100644 --- a/PACKAGING +++ b/PACKAGING @@ -33,7 +33,7 @@ Dependencies for libxkbcommon: - (build optional) gperf. Output included in git and tarball. To regenerate, use - `make update-keywords`. + `./scripts/update-keywords`. Dependencies for libxkbcommon-x11: - libxkbcommon. diff --git a/makeheader.py b/scripts/makeheader old mode 100644 new mode 100755 similarity index 100% rename from makeheader.py rename to scripts/makeheader diff --git a/makekeys.py b/scripts/makekeys old mode 100644 new mode 100755 similarity index 100% rename from makekeys.py rename to scripts/makekeys diff --git a/scripts/update-keysyms b/scripts/update-keysyms new file mode 100755 index 0000000..3356a35 --- /dev/null +++ b/scripts/update-keysyms @@ -0,0 +1,6 @@ +#!/bin/sh +# Run this to regenerate xkbcommon-keysyms.h from the X11 headers +# defining the keysyms and update the name <-> keysym mapping. +export LC_CTYPE=C +scripts/makeheader > xkbcommon/xkbcommon-keysyms.h +scripts/makekeys xkbcommon/xkbcommon-keysyms.h > src/ks_tables.h diff --git a/scripts/update-keywords b/scripts/update-keywords new file mode 100755 index 0000000..65f0d1f --- /dev/null +++ b/scripts/update-keywords @@ -0,0 +1,4 @@ +#!/bin/sh +# Run this if you add/remove a new keyword to the xkbcomp scanner, +# or just want to regenerate the gperf file. +gperf < src/xkbcomp/keywords.gperf > src/xkbcomp/keywords.c