From 0177d3f6d5c7ef24b9a2d42474288f9072ea7e3f Mon Sep 17 00:00:00 2001 From: Niklas Claesson Date: Mon, 30 Apr 2018 13:58:27 +0200 Subject: [PATCH 07/16] Allow custom_target do depend on indexed output of custom_target Fixes: #3494 --- mesonbuild/backend/backends.py | 2 +- mesonbuild/build.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 5a401feb..16b91337 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -762,7 +762,7 @@ class Backend: fname = [os.path.join(self.build_to_src, target.subdir, i)] elif isinstance(i, build.BuildTarget): fname = [self.get_target_filename(i)] - elif isinstance(i, build.CustomTarget): + elif isinstance(i, (build.CustomTarget, build.CustomTargetIndex)): fname = [os.path.join(self.get_target_dir(i), p) for p in i.get_outputs()] elif isinstance(i, build.GeneratedList): fname = [os.path.join(self.get_target_private_dir(target), p) for p in i.get_outputs()] diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 352f8572..3d531d18 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1974,7 +1974,7 @@ def get_sources_string_names(sources): s = s.held_object if isinstance(s, str): names.append(s) - elif isinstance(s, (BuildTarget, CustomTarget, GeneratedList)): + elif isinstance(s, (BuildTarget, CustomTarget, CustomTargetIndex, GeneratedList)): names += s.get_outputs() elif isinstance(s, File): names.append(s.fname) -- 2.17.0