summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 3e12c89fe..f7b56bdef 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -332,6 +332,8 @@ class Backend:
link_deps = target.get_all_link_deps()
result = []
for ld in link_deps:
+ if ld is target:
+ continue
prospective = self.get_target_dir(ld)
if prospective not in result:
result.append(prospective)
@@ -744,9 +746,9 @@ class Backend:
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))
+ deps.append(os.path.join(self.environment.get_source_dir(), target.subdir, i))
else:
- deps.append(os.path.join(self.build_to_src, i))
+ deps.append(os.path.join(self.build_to_src, target.subdir, i))
return deps
def eval_custom_target_command(self, target, absolute_outputs=False):