aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorBálint Aradi <baradi09@gmail.com>2017-05-19 17:22:42 +0200
committerBálint Aradi <baradi09@gmail.com>2017-06-03 16:50:09 +0200
commite79b602298ca3810c4ee0c99a23ae3ae50c879b3 (patch)
treed0a4d9e1686fdfbd58b39c0d5b3fa82fc526080a /mesonbuild/interpreter.py
parent4828b46b73c0e4874634be0439a1653144e4e0e7 (diff)
downloadmeson-e79b602298ca3810c4ee0c99a23ae3ae50c879b3.zip
meson-e79b602298ca3810c4ee0c99a23ae3ae50c879b3.tar.gz
meson-e79b602298ca3810c4ee0c99a23ae3ae50c879b3.tar.bz2
Enable variables for output in configure_file
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py4
1 files changed, 4 insertions, 0 deletions
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))