From e79b602298ca3810c4ee0c99a23ae3ae50c879b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Fri, 19 May 2017 17:22:42 +0200 Subject: Enable variables for output in configure_file --- mesonbuild/interpreter.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mesonbuild') diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 454ee66..39d596f 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2344,6 +2344,10 @@ class Interpreter(InterpreterBase): output = kwargs['output'] if not isinstance(output, str): raise InterpreterException('Output file name must be a string') + if ifile_abs: + values = mesonlib.get_filenames_templates_dict([ifile_abs], None) + outputs = mesonlib.substitute_values([output], values) + output = outputs[0] if os.path.split(output)[0] != '': raise InterpreterException('Output file name must not contain a subdirectory.') (ofile_path, ofile_fname) = os.path.split(os.path.join(self.subdir, output)) -- cgit v1.1