]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
configure: set the meson executable suffix/ext
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 24 Sep 2025 12:04:16 +0000 (16:04 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 30 Sep 2025 15:33:25 +0000 (19:33 +0400)
The 'rustfmt' target runs meson: it needs the correct path with
extension on Windows.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250924120426.2158655-20-marcandre.lureau@redhat.com>

configure

index bf964947b8a2ab8c8212b1ef46aa878e690114fa..78445cbb4b374d3cd33b855b727246bec9c12b10 100755 (executable)
--- a/configure
+++ b/configure
@@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
 # We ignore PATH completely here: we want to use the venv's Meson
 # *exclusively*.
 
-meson="$(cd pyvenv/bin; pwd)/meson"
+# for msys2
+get_pwd() {
+    if pwd -W >/dev/null 2>&1; then
+        pwd -W
+    else
+        pwd
+    fi
+}
+
+meson="$(cd pyvenv/bin; get_pwd)/meson"
+if [ -f "$meson$EXESUF" ]; then
+  meson="$meson$EXESUF"
+fi
 
 # Conditionally ensure Sphinx is installed.