source: udev-lfs/makefile-incl.keymap@ e0d3c3d

7.4
Last change on this file since e0d3c3d was 6a5ec49, checked in by Bruce Dubbs <bdubbs@…>, 11 years ago

Update to systemd-206/udev-lfs-206-1

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10307 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[b2b1e1a]1# Custom systemd Makefile include that builds/installs keymap tool only for LFS
2
3# vim: tabstop=3
4
[028c886]5KEYMAPS = $(shell ls keymaps/* | sort)
6KEYMAPS_FR = $(shell ls keymaps-force-release/* | sort)
[b2b1e1a]7
8KEYMAP_DEPS = common src/udev/keymap/keys-from-name.h src/udev/keymap/keys-to-name.h
9
10src/udev/keymap/keys.txt:
11 @echo GEN $@
12 $(VB)awk '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ \
13 { \
14 if ($$2 != "KEY_MAX") { print $$2 } \
15 }' \
16 /usr/include/linux/input.h | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
17
18src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt
19 @echo GEN $@
20 $(VB)awk 'BEGIN \
21 { \
22 print "struct key \
23 { \
24 const char* name; \
25 unsigned short id; \
26 };"; \
27 \
28 print "%null-strings"; print "%%"; \
29 } \
30 { \
31 print $$1 ", " $$1 \
32 }' $< > $@
33
34src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf
35 @echo GEN $@
36 $(VB)gperf -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C $< > $@
37
38src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt
39 @echo GEN $@
40 $(VB)awk 'BEGIN \
41 { \
42 print "const char* const key_names[KEY_CNT] = { " \
43 } \
44 { \
45 print "[" $$1 "] = \"" $$1 "\"," \
46 } \
47 END{print "};" \
48 }' $< > $@
49
[6a5ec49]50keymap:
51 echo "keymap is now built into udevadm/udevd"
Note: See TracBrowser for help on using the repository browser.