diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-04-10 03:19:10 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-04-10 22:32:41 +0530 |
commit | 711c0cbd674a84fc2d28d0b92dfb62124180d3ef (patch) | |
tree | 2a28e7131aefff024a97f5113d80d11aece99985 /mesonbuild/backend/backends.py | |
parent | cdae69c0f8c5623f9e563c15a50e453530366e3d (diff) | |
download | meson-711c0cbd674a84fc2d28d0b92dfb62124180d3ef.zip meson-711c0cbd674a84fc2d28d0b92dfb62124180d3ef.tar.gz meson-711c0cbd674a84fc2d28d0b92dfb62124180d3ef.tar.bz2 |
vs: Fix depend_files support in custom targets
This was totally broken and we didn't notice because we had no tests
for it at all.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 2e630bd..e49793e 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -631,6 +631,22 @@ class Backend: srcs += fname return srcs + def get_custom_target_depend_files(self, target, absolute_paths=False): + deps = [] + for i in target.depend_files: + if isinstance(i, mesonlib.File): + if absolute_paths: + deps.append(i.absolute_path(self.environment.get_source_dir(), + self.environment.get_build_dir())) + else: + deps.append(i.rel_to_builddir(self.build_to_src)) + else: + if absolute_paths: + deps.append(os.path.join(self.environment.get_build_dir(), i)) + else: + deps.append(os.path.join(self.build_to_src, i)) + return deps + def eval_custom_target_command(self, target, absolute_outputs=False): # We want the outputs to be absolute only when using the VS backend # XXX: Maybe allow the vs backend to use relative paths too? |