summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--keymap/Makefile.am6
2 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index afe6740..3244f94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,7 @@ PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PROG_AWK
AC_PATH_PROG([GPERF], [gperf])
if test -z "$GPERF"; then
AC_MSG_ERROR(Could not find gperf)
diff --git a/keymap/Makefile.am b/keymap/Makefile.am
index 0da136a..9974eb4 100644
--- a/keymap/Makefile.am
+++ b/keymap/Makefile.am
@@ -40,15 +40,15 @@ CLEANFILES = keys.txt keys-from-name.gperf keys-from-name.h keys-to-name.h
#
keys.txt: /usr/include/linux/input.h
- awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@
+ $(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@
keys-from-name.gperf: keys.txt
- awk 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
+ $(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
keys-from-name.h: keys-from-name.gperf Makefile
$(GPERF) -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
keys-to-name.h: keys.txt Makefile
- awk 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
+ $(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@