diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-13 16:33:33 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-20 23:32:03 +0530 |
commit | a6c71c62c826325a15c048f348863ac788750911 (patch) | |
tree | c7c9a62778edd116b609e76af0223fcad711b121 | |
parent | 5ee92d5bb0c9ad6b6b5bf4b8847d8533dea24c77 (diff) | |
download | meson-a6c71c62c826325a15c048f348863ac788750911.zip meson-a6c71c62c826325a15c048f348863ac788750911.tar.gz meson-a6c71c62c826325a15c048f348863ac788750911.tar.bz2 |
gnome: Print an error message when generated files are passed to compile_resources
-rw-r--r-- | mesonbuild/modules/gnome.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 2a54f3a..2fd24d9 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -108,8 +108,15 @@ can not be used with the current version of glib-compiled-resources, due to ifile = os.path.join(ifile.subdir, ifile.fname) elif isinstance(ifile, str): ifile = os.path.join(state.subdir, ifile) + elif isinstance(ifile, (interpreter.CustomTargetHolder, + interpreter.GeneratedObjectsHolder)): + m = 'Resource xml files generated at build-time cannot be used ' \ + 'with gnome.compile_resources() because we need to scan ' \ + 'the xml for dependencies. Use configure_file() instead ' \ + 'to generate it at configure-time.' + raise MesonException(m) else: - raise RuntimeError('Unreachable code.') + raise MesonException('Invalid file argument: {!r}'.format(ifile)) depend_files, depends, subdirs = self._get_gresource_dependencies( state, ifile, source_dirs, dependencies) |