diff options
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | keymaps/Makefile.am | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | src/keymap/check-keymaps.sh.in (renamed from src/keymap/check-keymaps.sh) | 16 | ||||
-rw-r--r--[-rwxr-xr-x] | src/keymap/keyboard-force-release.sh.in | 0 |
4 files changed, 28 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index cf4934d762..796721a3c5 100644 --- a/configure.ac +++ b/configure.ac @@ -299,6 +299,7 @@ AC_CONFIG_FILES([Makefile src/gudev/Makefile src/gudev/gudev-1.0.pc src/keymap/Makefile + src/keymap/check-keymaps.sh src/keymap/keyboard-force-release.sh src/libudev/Makefile src/libudev/libudev.pc @@ -307,4 +308,14 @@ AC_CONFIG_FILES([Makefile src/test/Makefile test/Makefile]) + AC_OUTPUT + +dnl Set configured scripts executable +if test -f src/keymap/check-keymaps.sh; then + chmod +x src/keymap/check-keymaps.sh +fi + +if test -f src/keymap/keyboard-force-release.sh; then + chmod +x src/keymap/keyboard-force-release.sh +fi diff --git a/keymaps/Makefile.am b/keymaps/Makefile.am index ba53b030a5..a5dfecf339 100644 --- a/keymaps/Makefile.am +++ b/keymaps/Makefile.am @@ -4,7 +4,7 @@ rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ udevkeymapdir = $(udevlibexecdir)/keymaps -dist_udevkeymap_DATA = \ +KEYMAPS = \ acer \ acer-aspire_5720 \ acer-aspire_8930 \ @@ -65,3 +65,9 @@ dist_udevkeymap_DATA = \ toshiba-satellite_a110 \ toshiba-satellite_m30x \ zepto-znote + +dist_udevkeymap_DATA = \ + $(KEYMAPS) + +EXTRA_DIST = \ + $(KEYMAPS) diff --git a/src/keymap/check-keymaps.sh b/src/keymap/check-keymaps.sh.in index e3abe672d1..a62b48d4d5 100755..100644 --- a/src/keymap/check-keymaps.sh +++ b/src/keymap/check-keymaps.sh.in @@ -4,18 +4,22 @@ # and that all key maps listed in the rules are valid and present in # Makefile.am -SRCDIR=${1:-../..} -KEYLIST=${2:-${SRCDIR}/src/keymap/keys.txt} +top_srcdir=@top_srcdir@ +top_builddir=@top_builddir@ -[ -e "$KEYLIST" ] || { - echo "need $KEYLIST please build first" >&2 - exit 1 -} +SRCDIR=${1:-${top_srcdir}} +BUILDDIR=${1:-${top_builddir}} +KEYLIST=${2:-${BUILDDIR}/src/keymap/keys.txt} KEYMAPS_DIR=${SRCDIR}/keymaps KEYMAPS_LIST=$(ls ${KEYMAPS_DIR}/* | grep -v Makefile) RULES=${SRCDIR}/rules/95-keymap.rules +[ -e "$KEYLIST" ] || { + echo "need $KEYLIST please build first" >&2 + exit 1 +} + missing=$(join -v 2 <(awk '{print tolower(substr($1,5))}' $KEYLIST | sort -u) \ <(grep -hv '^#' ${KEYMAPS_LIST}| awk '{print $2}' | sort -u)) [ -z "$missing" ] || { diff --git a/src/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in index b82674840f..b82674840f 100755..100644 --- a/src/keymap/keyboard-force-release.sh.in +++ b/src/keymap/keyboard-force-release.sh.in |