[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 048/150] meson: keymap-gen
From: |
Paolo Bonzini |
Subject: |
[PULL 048/150] meson: keymap-gen |
Date: |
Tue, 18 Aug 2020 10:08:43 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 38 --------------------------------------
meson.build | 1 +
ui/meson.build | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 35 insertions(+), 38 deletions(-)
create mode 100644 ui/meson.build
diff --git a/Makefile b/Makefile
index 79abbedd9d..5fbf5e4bbd 100644
--- a/Makefile
+++ b/Makefile
@@ -132,44 +132,6 @@ generated-files-y += module_block.h
generated-files-y += .git-submodule-status
-KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
-KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
-
-KEYCODEMAP_FILES = \
- ui/input-keymap-atset1-to-qcode.c.inc \
- ui/input-keymap-linux-to-qcode.c.inc \
- ui/input-keymap-qcode-to-atset1.c.inc \
- ui/input-keymap-qcode-to-atset2.c.inc \
- ui/input-keymap-qcode-to-atset3.c.inc \
- ui/input-keymap-qcode-to-linux.c.inc \
- ui/input-keymap-qcode-to-qnum.c.inc \
- ui/input-keymap-qcode-to-sun.c.inc \
- ui/input-keymap-qnum-to-qcode.c.inc \
- ui/input-keymap-usb-to-qcode.c.inc \
- ui/input-keymap-win32-to-qcode.c.inc \
- ui/input-keymap-x11-to-qcode.c.inc \
- ui/input-keymap-xorgevdev-to-qcode.c.inc \
- ui/input-keymap-xorgkbd-to-qcode.c.inc \
- ui/input-keymap-xorgxquartz-to-qcode.c.inc \
- ui/input-keymap-xorgxwin-to-qcode.c.inc \
- ui/input-keymap-osx-to-qcode.c.inc \
- $(NULL)
-
-generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
-
-ui/input-keymap-%.c.inc: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV)
$(SRC_PATH)/ui/Makefile.objs
- $(call quiet-command,\
- stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
- test -e $(KEYCODEMAP_GEN) && \
- $(PYTHON) $(KEYCODEMAP_GEN) \
- --lang glib2 \
- --varname qemu_input_map_$${src}_to_$${dst} \
- code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
- > $@ || rm -f $@, "GEN", "$@")
-
-$(KEYCODEMAP_GEN): .git-submodule-status
-$(KEYCODEMAP_CSV): .git-submodule-status
-
edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
$(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
diff --git a/meson.build b/meson.build
index 69e099fb8f..d3104165fc 100644
--- a/meson.build
+++ b/meson.build
@@ -289,6 +289,7 @@ subdir('trace')
subdir('util')
subdir('crypto')
subdir('storage-daemon')
+subdir('ui')
# Build targets from sourcesets
diff --git a/ui/meson.build b/ui/meson.build
new file mode 100644
index 0000000000..a6aa7f2b36
--- /dev/null
+++ b/ui/meson.build
@@ -0,0 +1,34 @@
+keymaps = [
+ ['atset1', 'qcode'],
+ ['linux', 'qcode'],
+ ['qcode', 'atset1'],
+ ['qcode', 'atset2'],
+ ['qcode', 'atset3'],
+ ['qcode', 'linux'],
+ ['qcode', 'qnum'],
+ ['qcode', 'sun'],
+ ['qnum', 'qcode'],
+ ['usb', 'qcode'],
+ ['win32', 'qcode'],
+ ['x11', 'qcode'],
+ ['xorgevdev', 'qcode'],
+ ['xorgkbd', 'qcode'],
+ ['xorgxquartz', 'qcode'],
+ ['xorgxwin', 'qcode'],
+ ['osx', 'qcode'],
+]
+
+if have_system
+ foreach e : keymaps
+ output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
+ genh += custom_target(output,
+ output: output,
+ capture: true,
+ build_by_default: true, # to be removed when added to a
target
+ input: files('keycodemapdb/data/keymaps.csv'),
+ command: [python.full_path(),
files('keycodemapdb/tools/keymap-gen'),
+ '--lang', 'glib2',
+ '--varname',
'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
+ 'code-map', '@INPUT0@', e[0], e[1]])
+ endforeach
+endif
--
2.26.2
- [PULL 033/150] contrib/rdmacm-mux: convert to Meson, (continued)
- [PULL 033/150] contrib/rdmacm-mux: convert to Meson, Paolo Bonzini, 2020/08/18
- [PULL 037/150] contrib/elf2dmp: convert to meson, Paolo Bonzini, 2020/08/18
- [PULL 039/150] meson: add solaris and Haiku libraries, Paolo Bonzini, 2020/08/18
- [PULL 045/150] meson: add qemu-keymap, Paolo Bonzini, 2020/08/18
- [PULL 041/150] meson: convert vss-win32, Paolo Bonzini, 2020/08/18
- [PULL 043/150] meson: convert dummy Windows qga/qemu-ga target, Paolo Bonzini, 2020/08/18
- [PULL 050/150] meson: generate shader headers, Paolo Bonzini, 2020/08/18
- [PULL 049/150] meson: generate qemu-version.h, Paolo Bonzini, 2020/08/18
- [PULL 052/150] meson: handle edk2 bios and descriptors, Paolo Bonzini, 2020/08/18
- [PULL 047/150] meson: add virtfs-proxy-helper, Paolo Bonzini, 2020/08/18
- [PULL 048/150] meson: keymap-gen,
Paolo Bonzini <=
- [PULL 051/150] meson: generate hxtool files, Paolo Bonzini, 2020/08/18
- [PULL 058/150] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/08/18
- [PULL 059/150] meson: convert io directory to Meson, Paolo Bonzini, 2020/08/18
- [PULL 040/150] meson: convert qemu-ga, Paolo Bonzini, 2020/08/18
- [PULL 054/150] meson: convert tests/fp and check-softfloat, Paolo Bonzini, 2020/08/18
- [PULL 057/150] meson: convert authz directory to Meson, Paolo Bonzini, 2020/08/18
- [PULL 065/150] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/08/18
- [PULL 055/150] meson: convert check-qapi-schema, Paolo Bonzini, 2020/08/18
- [PULL 056/150] meson: convert qom directory to Meson (tools part), Paolo Bonzini, 2020/08/18
- [PULL 062/150] meson: add modules infrastructure, Paolo Bonzini, 2020/08/18