aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-07-19 23:15:41 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2017-07-21 20:16:08 +0300
commit67f0a1a44db7c7de4b37ac34b14ac866708ccbdb (patch)
treee39c62158aa70cddbcea71225744a8add13b01c5
parent035b2525aca843a5f0fdba8f96a4f40999504d99 (diff)
downloadmeson-67f0a1a44db7c7de4b37ac34b14ac866708ccbdb.zip
meson-67f0a1a44db7c7de4b37ac34b14ac866708ccbdb.tar.gz
meson-67f0a1a44db7c7de4b37ac34b14ac866708ccbdb.tar.bz2
Fix run_target() accepting ConfigureFile for command
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rwxr-xr-xtest cases/common/58 run target/configure.in3
-rw-r--r--test cases/common/58 run target/meson.build11
3 files changed, 16 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index f10d516..222e01d 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -560,6 +560,8 @@ int dummy;
elif isinstance(texe, build.CustomTarget):
deps.append(self.get_target_filename(texe))
cmd += [os.path.join(self.environment.get_build_dir(), self.get_target_filename(texe))]
+ elif isinstance(texe, mesonlib.File):
+ cmd.append(texe.absolute_path(self.environment.get_source_dir(), self.environment.get_build_dir()))
else:
cmd.append(target.command)
cmd += arg_strings
diff --git a/test cases/common/58 run target/configure.in b/test cases/common/58 run target/configure.in
new file mode 100755
index 0000000..0d42d04
--- /dev/null
+++ b/test cases/common/58 run target/configure.in
@@ -0,0 +1,3 @@
+#!/usr/bin/env python3
+
+print('Success') \ No newline at end of file
diff --git a/test cases/common/58 run target/meson.build b/test cases/common/58 run target/meson.build
index a1c5ad8..686db1f 100644
--- a/test cases/common/58 run target/meson.build
+++ b/test cases/common/58 run target/meson.build
@@ -49,3 +49,14 @@ run_target('check_exists',
# executable but test that the output is generated correctly.
run_target('donotrunme',
command : hex)
+
+# Ensure configure files can be passed
+conf = configure_file(
+ input: 'configure.in',
+ output: 'configure',
+ configuration: configuration_data()
+)
+
+run_target('configure_script',
+ command : conf
+)