aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-04-08 21:25:25 +0300
committerGitHub <noreply@github.com>2017-04-08 21:25:25 +0300
commit761b28371a52ddb34457e15a801fd26b68e30381 (patch)
tree3ac51b036bdb953e39acb19a2f8e4371e3074ad6 /mesonbuild/backend/ninjabackend.py
parent664c2c909b35e8c37becf7bdfc948bf365a38e80 (diff)
parent27f5f0a9633b310f537f09ba0fdd79d86fcb962a (diff)
downloadmeson-761b28371a52ddb34457e15a801fd26b68e30381.zip
meson-761b28371a52ddb34457e15a801fd26b68e30381.tar.gz
meson-761b28371a52ddb34457e15a801fd26b68e30381.tar.bz2
Merge pull request #1518 from centricular/mesonintrospect-evar
Export MESONINTROSPECT to postconf/install/run_command scripts
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 3143970..5a9462f 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -20,7 +20,8 @@ from .. import mlog
from .. import dependencies
from .. import compilers
from ..compilers import CompilerArgs
-from ..mesonlib import File, MesonException, get_compiler_for_source, Popen_safe
+from ..mesonlib import File, MesonException
+from ..mesonlib import get_meson_script, get_compiler_for_source, Popen_safe
from .backends import CleanTrees, InstallData
from ..build import InvalidArguments
import os, sys, pickle, re
@@ -515,7 +516,7 @@ int dummy;
self.processed_targets[target.name + target.type_suffix()] = True
def generate_run_target(self, target, outfile):
- runnerscript = [sys.executable, self.environment.get_build_command(), '--internal', 'commandrunner']
+ cmd = [sys.executable, self.environment.get_build_command(), '--internal', 'commandrunner']
deps = self.unwrap_dep_list(target)
arg_strings = []
for i in target.args:
@@ -531,7 +532,10 @@ int dummy;
else:
raise AssertionError('Unreachable code in generate_run_target: ' + str(i))
elem = NinjaBuildElement(self.all_outputs, target.name, 'CUSTOM_COMMAND', [])
- cmd = runnerscript + [self.environment.get_source_dir(), self.environment.get_build_dir(), target.subdir]
+ cmd += [self.environment.get_source_dir(),
+ self.environment.get_build_dir(),
+ target.subdir,
+ get_meson_script(self.environment, 'mesonintrospect')]
texe = target.command
try:
texe = texe.held_object
@@ -608,7 +612,8 @@ int dummy;
d = InstallData(self.environment.get_source_dir(),
self.environment.get_build_dir(),
self.environment.get_prefix(),
- strip_bin)
+ strip_bin,
+ get_meson_script(self.environment, 'mesonintrospect'))
elem = NinjaBuildElement(self.all_outputs, 'install', 'CUSTOM_COMMAND', 'PHONY')
elem.add_dep('all')
elem.add_item('DESC', 'Installing files.')
@@ -729,9 +734,7 @@ int dummy;
def generate_tests(self, outfile):
self.serialise_tests()
- meson_exe = self.environment.get_build_command()
- (base, ext) = os.path.splitext(meson_exe)
- test_exe = base + 'test' + ext
+ test_exe = get_meson_script(self.environment, 'mesontest')
cmd = [sys.executable, test_exe, '--no-rebuild']
if not self.environment.coredata.get_builtin_option('stdsplit'):
cmd += ['--no-stdsplit']