]> xenbits.xensource.com Git - libvirt.git/commitdiff
scripts/meson-dist.py: Get builddir from env too
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 29 Apr 2024 07:49:17 +0000 (09:49 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 2 May 2024 12:33:20 +0000 (14:33 +0200)
When meson runs a dist script it sets both MESON_BUILD_ROOT and
MESON_DIST_ROOT envvars [1]. But for some reason, we took the
former as an argument and obtained the latter via env. Well,
obtain both via env.

1: https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonadd_dist_script
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
meson.build
scripts/meson-dist.py

index 2848d5c0704891adff63e00e3fb60f9512725bbf..e8b0094b911c74d8357c99afecb39492f6e777ac 100644 (file)
@@ -2195,8 +2195,8 @@ if git
 
   foreach file : dist_files
     meson.add_dist_script(
-      meson_python_prog.full_path(), python3_prog.full_path(), meson_dist_prog.full_path(),
-      meson.project_build_root(), file
+      meson_python_prog.full_path(), python3_prog.full_path(),
+      meson_dist_prog.full_path(), file
     )
   endforeach
 endif
index bb751b97d3372b4a88a2908f8fec48efab2f9700..39dd4fbab03222cc3331335818ce194607c7d278 100755 (executable)
@@ -4,9 +4,9 @@ import os
 import shutil
 import sys
 
-meson_build_root = sys.argv[1]
-file_name = sys.argv[2]
+file_name = sys.argv[1]
 
+meson_build_root = os.environ['MESON_BUILD_ROOT']
 meson_dist_root = os.environ['MESON_DIST_ROOT']
 
 shutil.copy(os.path.join(meson_build_root, file_name),