aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Behle <behlec@gmail.com>2018-06-30 19:37:04 +0200
committerChristoph Behle <behlec@gmail.com>2018-07-07 21:20:23 +0200
commit620c0b07a9bd93929590b88cf9c84026bc9ca1cd (patch)
treeaccfac4b414427ae77a6c378525755928d32453c
parent07f5a5e4901c3c5afde15b305df72a0d09f5af72 (diff)
downloadmeson-620c0b07a9bd93929590b88cf9c84026bc9ca1cd.zip
meson-620c0b07a9bd93929590b88cf9c84026bc9ca1cd.tar.gz
meson-620c0b07a9bd93929590b88cf9c84026bc9ca1cd.tar.bz2
Track line numbers for configure_file.
Track line numbers of calls. Warning reports now the line number of the first and the current write to the same file.
-rw-r--r--mesonbuild/interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 0974691..e28674e 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3451,9 +3451,9 @@ root and issuing %s.
if not isinstance(output, str):
raise InterpreterException('Output file name must be a string')
if output in self.configure_file_outputs:
- mlog.warning('Output file', mlog.bold(output), 'for configure_file overwritten.')
+ mlog.warning('Output file', mlog.bold(output), 'for configure_file overwritten. First time written in line', self.configure_file_outputs[output], 'now in line', self.current_lineno)
else:
- self.configure_file_outputs[output] = None
+ self.configure_file_outputs[output] = self.current_lineno
if ifile_abs:
values = mesonlib.get_filenames_templates_dict([ifile_abs], None)
outputs = mesonlib.substitute_values([output], values)