From 0a19267f309485df0889b67be118274cbb94c7f6 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 29 Jul 2017 14:37:23 +0300 Subject: [PATCH] build: move custom targets to scripts/ and remove from makefile These scripts generate source code that is committed to git and hence do not really belong in the build system. A maintainer runs them as needed. Signed-off-by: Ran Benita --- Makefile.am | 21 ++++----------------- PACKAGING | 2 +- makeheader.py => scripts/makeheader | 0 makekeys.py => scripts/makekeys | 0 scripts/update-keysyms | 6 ++++++ scripts/update-keywords | 4 ++++ 6 files changed, 15 insertions(+), 18 deletions(-) rename makeheader.py => scripts/makeheader (100%) mode change 100644 => 100755 rename makekeys.py => scripts/makekeys (100%) mode change 100644 => 100755 create mode 100755 scripts/update-keysyms create mode 100755 scripts/update-keywords 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