aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-03-25 08:07:46 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-03-28 00:55:01 +0530
commit27f5f0a9633b310f537f09ba0fdd79d86fcb962a (patch)
treef785006e3f80095df05d09bf3b7aa50f0def82fe /mesonbuild/backend/backends.py
parent53795d89df48ca722b018ff8720669deb6209be4 (diff)
downloadmeson-27f5f0a9633b310f537f09ba0fdd79d86fcb962a.zip
meson-27f5f0a9633b310f537f09ba0fdd79d86fcb962a.tar.gz
meson-27f5f0a9633b310f537f09ba0fdd79d86fcb962a.tar.bz2
Export MESONINTROSPECT to postconf/install/run_command scripts
Points to the `mesonintrospect.py` script corresponding to the currently-running version of Meson. Includes a test for all three methods of running scripts/commands. Closes https://github.com/mesonbuild/meson/issues/1385
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 5939488..9749eb4 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -20,7 +20,8 @@ from .. import mlog
from .. import compilers
import json
import subprocess
-from ..mesonlib import MesonException, get_compiler_for_source, classify_unity_sources
+from ..mesonlib import MesonException, get_meson_script
+from ..mesonlib import get_compiler_for_source, classify_unity_sources
from ..compilers import CompilerArgs
class CleanTrees:
@@ -33,7 +34,7 @@ class CleanTrees:
self.trees = trees
class InstallData:
- def __init__(self, source_dir, build_dir, prefix, strip_bin):
+ def __init__(self, source_dir, build_dir, prefix, strip_bin, mesonintrospect):
self.source_dir = source_dir
self.build_dir = build_dir
self.prefix = prefix
@@ -46,6 +47,7 @@ class InstallData:
self.po = []
self.install_scripts = []
self.install_subdirs = []
+ self.mesonintrospect = mesonintrospect
class ExecutableSerialisation:
def __init__(self, name, fname, cmd_args, env, is_cross, exe_wrapper,
@@ -673,7 +675,7 @@ class Backend:
def run_postconf_scripts(self):
env = {'MESON_SOURCE_ROOT': self.environment.get_source_dir(),
'MESON_BUILD_ROOT': self.environment.get_build_dir(),
- }
+ 'MESONINTROSPECT': get_meson_script(self.environment, 'mesonintrospect')}
child_env = os.environ.copy()
child_env.update(env)