10.0
10.0-rc1
10.1
10.1-rc1
11.0
11.0-rc1
11.0-rc2
11.0-rc3
11.1
11.1-rc1
11.2
11.2-rc1
11.3
11.3-rc1
12.0
12.0-rc1
12.1
12.1-rc1
12.2
12.2-rc1
7.5
7.6
7.7
7.8
7.9
8.0
8.1
8.2
8.3
8.4
9.0
9.1
arm
bdubbs/gcc13
ml-11.0
multilib
renodr/libudev-from-systemd
s6-init
trunk
xry111/arm64
xry111/arm64-12.0
xry111/clfs-ng
xry111/lfs-next
xry111/loongarch
xry111/loongarch-12.0
xry111/loongarch-12.1
xry111/loongarch-12.2
xry111/mips64el
xry111/multilib
xry111/pip3
xry111/rust-wip-20221008
xry111/update-glibc
Rev | Line | |
---|
[b2b1e1a] | 1 | # Custom systemd Makefile include that builds/installs keymap tool only for LFS
|
---|
| 2 |
|
---|
| 3 | # vim: tabstop=3
|
---|
| 4 |
|
---|
[028c886] | 5 | KEYMAPS = $(shell ls keymaps/* | sort)
|
---|
| 6 | KEYMAPS_FR = $(shell ls keymaps-force-release/* | sort)
|
---|
[b2b1e1a] | 7 |
|
---|
| 8 | KEYMAP_DEPS = common src/udev/keymap/keys-from-name.h src/udev/keymap/keys-to-name.h
|
---|
| 9 |
|
---|
| 10 | src/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 |
|
---|
| 18 | src/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 |
|
---|
| 34 | src/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 |
|
---|
| 38 | src/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] | 50 | keymap:
|
---|
[6c302b6] | 51 | @echo "keymap is now built into udevadm/udevd"
|
---|
| 52 |
|
---|
| 53 | install-keymap:
|
---|
| 54 | @echo "keymap is now built into udevadm/udevd"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.