qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PULL 11/12] meson: use subproject for keycodemapdb
Date: Fri, 26 May 2023 18:08:23 +0200	[thread overview]
Message-ID: <20230526160824.655279-12-pbonzini@redhat.com> (raw)
In-Reply-To: <20230526160824.655279-1-pbonzini@redhat.com>

By using a subproject, our own meson.build can use variables from
the subproject instead of hard-coded paths.  This is also the first step
towards managing downloads with .wrap files instead of submodule.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 .gitmodules                      | 4 ++--
 configure                        | 4 ++--
 scripts/archive-source.sh        | 2 +-
 {ui => subprojects}/keycodemapdb | 0
 ui/meson.build                   | 8 ++++----
 5 files changed, 9 insertions(+), 9 deletions(-)
 rename {ui => subprojects}/keycodemapdb (100%)

diff --git a/.gitmodules b/.gitmodules
index 3ed5d073d630..f8b2ddf3877c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -25,8 +25,8 @@
 [submodule "roms/QemuMacDrivers"]
 	path = roms/QemuMacDrivers
 	url = https://gitlab.com/qemu-project/QemuMacDrivers.git
-[submodule "ui/keycodemapdb"]
-	path = ui/keycodemapdb
+[submodule "subprojects/keycodemapdb"]
+	path = subprojects/keycodemapdb
 	url = https://gitlab.com/qemu-project/keycodemapdb.git
 [submodule "roms/seabios-hppa"]
 	path = roms/seabios-hppa
diff --git a/configure b/configure
index d42bbd07310b..0e9305848955 100755
--- a/configure
+++ b/configure
@@ -253,7 +253,7 @@ else
     git_submodules_action="ignore"
 fi
 
-git_submodules="ui/keycodemapdb"
+git_submodules="subprojects/keycodemapdb"
 git="git"
 debug_tcg="no"
 docs="auto"
@@ -805,7 +805,7 @@ case $git_submodules_action in
         fi
     ;;
     ignore)
-        if ! test -f "$source_path/ui/keycodemapdb/README"
+        if ! test -f "$source_path/subprojects/keycodemapdb/README"
         then
             echo
             echo "ERROR: missing GIT submodules"
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index a7c2886334f0..dba5ae05b67e 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -26,7 +26,7 @@ sub_file="${sub_tdir}/submodule.tar"
 # independent of what the developer currently has initialized
 # in their checkout, because the build environment is completely
 # different to the host OS.
-submodules="subprojects/dtc ui/keycodemapdb"
+submodules="subprojects/dtc subprojects/keycodemapdb"
 submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
 sub_deinit=""
 
diff --git a/ui/keycodemapdb b/subprojects/keycodemapdb
similarity index 100%
rename from ui/keycodemapdb
rename to subprojects/keycodemapdb
diff --git a/ui/meson.build b/ui/meson.build
index 330369707dd7..e09b616a66bc 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -162,15 +162,15 @@ keymaps = [
 ]
 
 if have_system or xkbcommon.found()
+  keycodemapdb_proj = subproject('keycodemapdb', required: true)
   foreach e : keymaps
     output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
     genh += custom_target(output,
                   output: output,
                   capture: true,
-                  input: files('keycodemapdb/data/keymaps.csv'),
-                  command: [python, files('keycodemapdb/tools/keymap-gen'),
-                            'code-map',
-                            '--lang', 'glib2',
+                  input: keycodemapdb_proj.get_variable('keymaps_csv'),
+                  command: [python, keycodemapdb_proj.get_variable('keymap_gen').full_path(),
+                            'code-map', '--lang', 'glib2',
                             '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
                             '@INPUT0@', e[0], e[1]])
   endforeach
-- 
2.40.1



  parent reply	other threads:[~2023-05-26 16:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 16:08 [PULL 00/12] (Mostly) build system patches for 2023-05-26 Paolo Bonzini
2023-05-26 16:08 ` [PULL 01/12] tests/docker: simplify HOST_ARCH definition Paolo Bonzini
2023-05-26 16:08 ` [PULL 02/12] tests/vm: fix and " Paolo Bonzini
2023-05-26 16:08 ` [PULL 03/12] Makefile: remove $(TESTS_PYTHON) Paolo Bonzini
2023-05-26 16:08 ` [PULL 04/12] configure: unset harmful environment variables Paolo Bonzini
2023-05-27 15:57   ` Michael Tokarev
2023-05-28 18:11     ` Juan Quintela
2023-05-26 16:08 ` [PULL 05/12] meson: Remove leftover comment Paolo Bonzini
2023-05-26 16:08 ` [PULL 06/12] meson: Add static glib dependency for initrd-stress.img Paolo Bonzini
2023-05-26 16:08 ` [PULL 07/12] slirp: update wrap to latest master Paolo Bonzini
2023-05-26 16:08 ` [PULL 08/12] virtio: qmp: fix memory leak Paolo Bonzini
2023-05-27  9:30   ` Michael Tokarev
2023-05-26 16:08 ` [PULL 09/12] meson: simplify logic for -Dfdt Paolo Bonzini
2023-05-26 16:08 ` [PULL 10/12] meson: use subproject for internal libfdt Paolo Bonzini
2023-05-26 16:08 ` Paolo Bonzini [this message]
2023-05-26 16:08 ` [PULL 12/12] configure: ignore --make Paolo Bonzini
2023-05-27  0:16 ` [PULL 00/12] (Mostly) build system patches for 2023-05-26 Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230526160824.655279-12-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).