diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-11 22:58:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 22:58:23 +0300 |
commit | eaaaee642132d3a568136dc740f74f8aaf4388b0 (patch) | |
tree | a749b2084b5444b34f6ae55fcc13ade3f77777fa /mesonbuild/build.py | |
parent | 315a52533c077c898033ee1ab0d5f138d7dec905 (diff) | |
parent | 711c0cbd674a84fc2d28d0b92dfb62124180d3ef (diff) | |
download | meson-eaaaee642132d3a568136dc740f74f8aaf4388b0.zip meson-eaaaee642132d3a568136dc740f74f8aaf4388b0.tar.gz meson-eaaaee642132d3a568136dc740f74f8aaf4388b0.tar.bz2 |
Merge pull request #1596 from centricular/test-rebuilds
Test that build and custom targets are rebuilt on changes
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 4df7ef5..062b70a 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1328,12 +1328,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) |