From bc70aa1df33ce91820111058e22f00eeef13036b Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 29 Apr 2024 09:49:17 +0200 Subject: [PATCH] scripts/meson-dist.py: Get builddir from env too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- meson.build | 4 ++-- scripts/meson-dist.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 2848d5c070..e8b0094b91 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),