Allow custom_target do depend on indexed output of custom_target

Fixes: #3494
0.46
Niklas Claesson 7 years ago committed by Nirbheek Chauhan
parent 476e307fff
commit 0177d3f6d5
  1. 2
      mesonbuild/backend/backends.py
  2. 2
      mesonbuild/build.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()]

@ -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)

Loading…
Cancel
Save