summaryrefslogtreecommitdiff
path: root/src/keymap
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-22 21:51:53 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-22 21:51:53 -0500
commitb396e02c4300b3797b651656b5602b82feb9b7bc (patch)
tree42be07edc44d53b15f73f6d663c5708ef04c07f7 /src/keymap
parentcb7d6ade4157f691a3745e9df98dda7917249be9 (diff)
Fix keymap test during make distcheck
The keys/keymap test preformed by src/keymap/check-keymaps.sh must find both keys.txt and the keymap directory. When building out of the source tree, eg when doing `make distcheck`, these are located at ${top_builddir}/src/keymap/keys.txt and ${top_srcdir}/keymap/, respectively. This patch fixes the build so that these are now correctly found. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/keymap')
-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.in0
2 files changed, 10 insertions, 6 deletions
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