]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
meson: use subproject for keycodemapdb
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 May 2023 12:07:22 +0000 (12:07 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 May 2023 10:34:18 +0000 (12:34 +0200)
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
configure
scripts/archive-source.sh
subprojects/keycodemapdb [new submodule]
ui/keycodemapdb [deleted submodule]
ui/meson.build

index 3ed5d073d63082b6efab19e8461211501f4a4fa2..f8b2ddf3877cfb0a70d9a9f01fca39ce7f29ac82 100644 (file)
@@ -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
index d42bbd07310be41f7bf97621c479364acfc4a0bb..0e9305848955a7bd717e9335636037124367e26d 100755 (executable)
--- 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"
index a7c2886334f0f5182de0bd8411481e70f6e5a8ae..dba5ae05b67eb4dd38b89fc1cf040bab24f77afd 100755 (executable)
@@ -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/subprojects/keycodemapdb b/subprojects/keycodemapdb
new file mode 160000 (submodule)
index 0000000..f5772a6
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6
diff --git a/ui/keycodemapdb b/ui/keycodemapdb
deleted file mode 160000 (submodule)
index f5772a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6
index 330369707dd7e79d93fcc0ee0f70aa26d752e783..e09b616a66bc8d16b5ba98372a5df02a943d42c4 100644 (file)
@@ -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