diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2017-07-20 19:57:33 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-21 20:11:50 +0300 |
commit | ceea746222cf77b2919a05a0f48ca20dd2c6e012 (patch) | |
tree | 86057babe4aa1c19806aef86698374de7ad43789 /mesonbuild/interpreter.py | |
parent | 979efce04a26287639615d32182dff97582bf6ee (diff) | |
download | meson-ceea746222cf77b2919a05a0f48ca20dd2c6e012.zip meson-ceea746222cf77b2919a05a0f48ca20dd2c6e012.tar.gz meson-ceea746222cf77b2919a05a0f48ca20dd2c6e012.tar.bz2 |
configure_file: warn in case a variable to subsitute is not present in the passed configuration. Fixes #2090
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 359dd17..d05bed5 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2512,7 +2512,14 @@ class Interpreter(InterpreterBase): if conffile not in self.build_def_files: self.build_def_files.append(conffile) os.makedirs(os.path.join(self.environment.build_dir, self.subdir), exist_ok=True) - mesonlib.do_conf_file(ifile_abs, ofile_abs, conf.held_object) + missing_variables = mesonlib.do_conf_file(ifile_abs, ofile_abs, + conf.held_object) + if missing_variables: + var_list = ", ".join(map(repr, sorted(missing_variables))) + mlog.warning( + "The variable(s) %s in the input file %r are not " + "present in the given configuration data" % ( + var_list, inputfile)) else: mesonlib.dump_conf_header(ofile_abs, conf.held_object) conf.mark_used() |