blob: 47dbeaffb0c77f5326242f71418b22a2d20d58bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-nc,v 1.2 2016/09/17 15:33:59 richard Exp $
key event codes have migrated from linux/input.h to linux/input-event-codes .h
so update to support generating gperf hash from either.
--- tools/Makefile.am.orig 2009-11-09 15:33:53.000000000 +0000
+++ tools/Makefile.am
@@ -8,8 +8,11 @@ endif
if HALD_COMPILE_FREEBSD
SUBDIRS += freebsd
endif
+if HALD_COMPILE_NETBSD
+SUBDIRS += netbsd
+endif
-DIST_SUBDIRS = freebsd linux
+DIST_SUBDIRS = freebsd linux netbsd
AM_CPPFLAGS = \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
@@ -80,7 +83,11 @@ if BUILD_KEYMAPS
if HAVE_GPERF
hal-setup-keymap-keys.txt: @LINUX_INPUT_H@
- awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@
+ if test -f /usr/include/linux/input-event-codes.h; then \
+ awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < /usr/include/linux/input-event-codes.h > $@; \
+ else \
+ awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@; \
+ fi
hal-setup-keymap-hash-name.gperf: hal-setup-keymap-keys.txt
awk 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", KEY_" $$1 }' < $< > $@
|