aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-07-26 11:19:47 +0400
committerDylan Baker <dylan@pnwbakers.com>2021-07-27 11:26:05 -0700
commit23ea9feee3f94673c0042527dcd7e98013f1651a (patch)
treec56d9ef8bbe3c1ccb37baa1356f0b8010548cc2e /mesonbuild
parent46380b5b1e82a5c2b49299eb35ac185d4fa02e18 (diff)
downloadmeson-23ea9feee3f94673c0042527dcd7e98013f1651a.zip
meson-23ea9feee3f94673c0042527dcd7e98013f1651a.tar.gz
meson-23ea9feee3f94673c0042527dcd7e98013f1651a.tar.bz2
build: learn to take CustomTargetIndex as custom_target command
Fix ERROR: Argument <CustomTargetIndex:...>[0]> in "command" is invalid. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index d72aab8..8e0d81b 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2186,6 +2186,10 @@ class CommandBase:
elif isinstance(c, (BuildTarget, CustomTarget)):
self.dependencies.append(c)
final_cmd.append(c)
+ elif isinstance(c, CustomTargetIndex):
+ FeatureNew.single_use('CustomTargetIndex for command argument', '0.60', self.subproject)
+ self.dependencies.append(c.target)
+ final_cmd += self.flatten_command(File.from_built_file(c.get_subdir(), c.get_filename()))
elif isinstance(c, list):
final_cmd += self.flatten_command(c)
else: