[PATCH] scripts/meson-dist.py: Git builddir from env too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When meson runs a dist script it set 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@xxxxxxxxxx>
---

Another option is to pass both directories as arguments. But this
inconsistent solution bothers me. Especially since I want to copy the
script somewhere else (stay tuned to learn more).

 meson.build           | 4 ++--
 scripts/meson-dist.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 1518afa1cb..5aa50e0d64 100644
--- a/meson.build
+++ b/meson.build
@@ -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
diff --git a/scripts/meson-dist.py b/scripts/meson-dist.py
index bb751b97d3..39dd4fbab0 100755
--- a/scripts/meson-dist.py
+++ b/scripts/meson-dist.py
@@ -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),
-- 
2.43.2
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux