[PATCH v2] meson: Do not consider qemu-keymap a 'tool'

Philippe Mathieu-Daudé posted 1 patch 3 years, 8 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200821153155.1247675-1-philmd@redhat.com
meson.build    | 5 -----
ui/meson.build | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
[PATCH v2] meson: Do not consider qemu-keymap a 'tool'
Posted by Philippe Mathieu-Daudé 3 years, 8 months ago
We need qemu-keymap to generate the keymaps.

This fixes when configuring with --disable-tools:

  Compiling C object qemu-keymap.p/qemu-keymap.c.o
  Compiling C object qemu-keymap.p/ui_input-keymap.c.o
  Compiling C object qemu-edid.p/qemu-edid.c.o
  ../ui/input-keymap.c:7:49: fatal error: ui/input-keymap-atset1-to-qcode.c.inc: No such file or directory
  compilation terminated.
  Makefile.ninja:688: recipe for target 'qemu-keymap.p/ui_input-keymap.c.o' failed
  make: *** [qemu-keymap.p/ui_input-keymap.c.o] Error 1

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v2: Move to ui/ (Paolo)
---
 meson.build    | 5 -----
 ui/meson.build | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index 808f50b07ef..709d7e6ccc2 100644
--- a/meson.build
+++ b/meson.build
@@ -1078,11 +1078,6 @@ if have_tools
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
 
-  if 'CONFIG_XKBCOMMON' in config_host
-    executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'),
-               dependencies: [qemuutil, xkbcommon], install: true)
-  endif
-
   executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
              dependencies: qemuutil,
              install: true)
diff --git a/ui/meson.build b/ui/meson.build
index 6f74d30ea06..2b7861073ff 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -96,6 +96,11 @@ keymaps = [
 ]
 
 if have_system
+  if 'CONFIG_XKBCOMMON' in config_host
+  executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'),
+             dependencies: [qemuutil, xkbcommon], install: true)
+  endif
+
   foreach e : keymaps
     output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
     genh += custom_target(output,
-- 
2.26.2