From 983668cfd40f5eed4a555922586826ccdef560de Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Wed, 5 May 2021 10:59:53 +0200 Subject: Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0 * meson.build: * docs/reference/meson.build: * gio/giomm/meson.build: * glib/glibmm/meson.build: Call add_dist_script() in a subproject, if meson.version() >= 0.58.0. * tools/build_scripts/handle-built-files.py: Use MESON_PROJECT_DIST_ROOT if it exists, else MESON_DIST_ROOT. It exists if meson.version() >= 0.58.0. --- tools/build_scripts/handle-built-files.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/build_scripts/handle-built-files.py b/tools/build_scripts/handle-built-files.py index 862ab5f7..e22600b4 100755 --- a/tools/build_scripts/handle-built-files.py +++ b/tools/build_scripts/handle-built-files.py @@ -123,9 +123,12 @@ def dist_built_files(is_msvc_files=False): # ... # is an absolute path in the build directory or source directory. - # is a distribution directory, relative to MESON_DIST_ROOT. + # is a distribution directory, relative to MESON_PROJECT_DIST_ROOT. + + # MESON_PROJECT_DIST_ROOT is set only if meson.version() >= 0.58.0. + project_dist_root = os.getenv('MESON_PROJECT_DIST_ROOT', os.getenv('MESON_DIST_ROOT')) built_h_cc_dir = sys.argv[2] - dist_dir_root = os.path.join(os.getenv('MESON_DIST_ROOT'), sys.argv[3]) + dist_dir_root = os.path.join(project_dist_root, sys.argv[3]) dist_dir = dist_dir_root # Distribute .h and .cc files built from .m4 files, or generated MSVC files. -- cgit v1.2.1