diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index f10d5164b..222e01dc8 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 000000000..0d42d0441 --- /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 a1c5ad8ab..686db1f81 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 +)