diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-04-06 01:40:00 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-04-10 22:32:41 +0530 |
commit | b603aba3ec58355bb3f6924908411c902b6f88d8 (patch) | |
tree | d8fe0e7867e26208d027021aca118927f98e7b4b /mesonbuild/build.py | |
parent | 7d5e4012fe7d5984d1039d8647a7cb80fe484e9e (diff) | |
download | meson-b603aba3ec58355bb3f6924908411c902b6f88d8.zip meson-b603aba3ec58355bb3f6924908411c902b6f88d8.tar.gz meson-b603aba3ec58355bb3f6924908411c902b6f88d8.tar.bz2 |
Add tests for target and custom_target rebuild
Test that changing src tree headers rebuilds targets, and test that
changing any file used in a custom_target will rebuild it.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index df3f37b..6493684 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1318,12 +1318,16 @@ class CustomTarget(Target): for c in cmd: if hasattr(c, 'held_object'): c = c.held_object - if isinstance(c, (str, File)): + if isinstance(c, str): + final_cmd.append(c) + elif isinstance(c, File): + self.depend_files.append(c) final_cmd.append(c) elif isinstance(c, dependencies.ExternalProgram): if not c.found(): m = 'Tried to use not-found external program {!r} in "command"' raise InvalidArguments(m.format(c.name)) + self.depend_files.append(File.from_absolute_file(c.get_path())) final_cmd += c.get_command() elif isinstance(c, (BuildTarget, CustomTarget)): self.dependencies.append(c) |