diff options
author | Christoph Behle <behlec@gmail.com> | 2018-07-07 21:13:39 +0200 |
---|---|---|
committer | Christoph Behle <behlec@gmail.com> | 2018-07-08 18:19:17 +0200 |
commit | 2f494d2ccf798a1a1684ccece4f8b5d35b828bf0 (patch) | |
tree | 0a5925abf4e58e3f7c651d6c0ca29eb66cd8b4c9 | |
parent | 9cf38700d8f507c40c1e46e680e42d5391a24b79 (diff) | |
download | meson-2f494d2ccf798a1a1684ccece4f8b5d35b828bf0.zip meson-2f494d2ccf798a1a1684ccece4f8b5d35b828bf0.tar.gz meson-2f494d2ccf798a1a1684ccece4f8b5d35b828bf0.tar.bz2 |
Simplified and cleaned up warning.
-rw-r--r-- | mesonbuild/interpreter.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index a882e11..8b83e86 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3452,10 +3452,10 @@ root and issuing %s. if not isinstance(output, str): raise InterpreterException('Output file name must be a string') if ofile_rpath in self.configure_file_outputs: - if len(self.subdir) > 0: - mlog.warning('Output file', mlog.bold(ofile_rpath), 'for configure_file overwritten. First time written in subdir', self.subdir, 'line', self.configure_file_outputs[ofile_rpath], 'now in line', self.current_lineno) - else: - mlog.warning('Output file', mlog.bold(ofile_rpath), 'for configure_file overwritten. First time written in line', self.configure_file_outputs[ofile_rpath], 'now in line', self.current_lineno) + mesonbuildfile = os.path.join(self.subdir, 'meson.build') + current_call = "{}:{}".format(mesonbuildfile, self.current_lineno) + first_call = "{}:{}".format(mesonbuildfile, self.configure_file_outputs[ofile_rpath]) + mlog.warning('Output file', mlog.bold("'{}'".format(ofile_rpath)), 'for configure_file() at', current_call, 'overwrites configure_file() output at', first_call) else: self.configure_file_outputs[ofile_rpath] = self.current_lineno if ifile_abs: |