diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-10-26 21:12:22 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-10-26 21:12:22 +0200 |
commit | a16463972dbbc7c944dbbfbee57ade758e3077da (patch) | |
tree | 470404f8aaabf8dbcb4d59f7d156e4a46d665bef /build.py | |
parent | c0070aadae450d8367f54a4658f474a8a8ab4432 (diff) | |
download | meson-a16463972dbbc7c944dbbfbee57ade758e3077da.zip meson-a16463972dbbc7c944dbbfbee57ade758e3077da.tar.gz meson-a16463972dbbc7c944dbbfbee57ade758e3077da.tar.bz2 |
Parse contents of gresource xml and add deps manually. A bit of a hack but necessary due to missing upstream functionality. Closes #298.
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -711,13 +711,16 @@ class CustomTarget: 'install' : True, 'install_dir' : True, 'build_always' : True, - 'depends' : True} + 'depends' : True, + 'depend_files' : True, + } def __init__(self, name, subdir, kwargs): self.name = name self.subdir = subdir self.dependencies = [] self.extra_depends = [] + self.depend_files = [] # Files that this target depends on but are not on the command line. self.process_kwargs(kwargs) self.extra_files = [] self.install_rpath = '' @@ -795,6 +798,15 @@ class CustomTarget: if not isinstance(ed, CustomTarget) and not isinstance(ed, BuildTarget): raise InvalidArguments('Can only depend on toplevel targets.') self.extra_depends.append(ed) + depend_files = kwargs.get('depend_files', []) + if not isinstance(depend_files, list): + depend_files = [depend_files] + for i in depend_files: + if isinstance(i, (File, str)): + self.depend_files.append(i) + else: + mlog.debug(i) + raise InvalidArguments('Unknown type in depend_files.') def get_basename(self): return self.name |