diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-20 00:59:20 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-20 23:38:13 +0300 |
commit | 79d530e32509b8ccdc50a6769e8c786b3eccebd3 (patch) | |
tree | 49f6efe74cbccf3de19a208f163e228824f7f12b /mesonbuild/build.py | |
parent | 60e1676651a0ba1b5a1ff6e6ed443421f878b8e2 (diff) | |
download | meson-79d530e32509b8ccdc50a6769e8c786b3eccebd3.zip meson-79d530e32509b8ccdc50a6769e8c786b3eccebd3.tar.gz meson-79d530e32509b8ccdc50a6769e8c786b3eccebd3.tar.bz2 |
Generators can have extra target dependencies. Closes #4131.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index d51e2e3..65b2c20 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1273,6 +1273,7 @@ class Generator: self.exe = exe self.depfile = None self.capture = False + self.depends = [] self.process_kwargs(kwargs) def __repr__(self): @@ -1321,6 +1322,12 @@ class Generator: if not isinstance(capture, bool): raise InvalidArguments('Capture must be boolean.') self.capture = capture + if 'depends' in kwargs: + depends = listify(kwargs['depends'], unholder=True) + for d in depends: + if not isinstance(d, BuildTarget): + raise InvalidArguments('Depends entries must be build targets.') + self.depends.append(d) def get_base_outnames(self, inname): plainname = os.path.basename(inname) |