aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-11-09 03:04:37 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-11-09 03:04:37 +0530
commitb1898fd13959cbd49987efedef68a38ab9abb464 (patch)
tree6cac2c408c3d6366d7c7beed378c614a29db846b
parent66ec8c42585f7ff278bdbc9289cd19b0bf929205 (diff)
downloadmeson-b1898fd13959cbd49987efedef68a38ab9abb464.zip
meson-b1898fd13959cbd49987efedef68a38ab9abb464.tar.gz
meson-b1898fd13959cbd49987efedef68a38ab9abb464.tar.bz2
ninja: Pass absolute path of files to run targets
We already pass everything else (custom targets, build targets, etc) as absolute paths, and this is the only sane way to handle this till we rework the codebase to use File objects everywhere (after reworking the File object itself). Fixes https://github.com/mesonbuild/meson/issues/957
-rw-r--r--mesonbuild/backend/ninjabackend.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 8329b59..5fa7d79 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -515,10 +515,10 @@ int dummy;
arg_strings.append(os.path.join(self.environment.get_build_dir(), relfname))
deps.append(relfname)
elif isinstance(i, mesonlib.File):
- arg_strings.append(i.rel_to_builddir(self.build_to_src))
+ relfname = i.rel_to_builddir(self.build_to_src)
+ arg_strings.append(os.path.join(self.environment.get_build_dir(), relfname))
else:
- mlog.debug(str(i))
- raise MesonException('Unreachable code in generate_run_target.')
+ 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]
texe = target.command