aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-03-13 12:00:22 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2021-03-24 22:50:10 +0200
commit80c89a650b6f2219583bddf51316777e12d5514c (patch)
tree1810cd8e16c867bd216d2178d399709af1674490
parent9b27d110d1e9dac576e459f222bcfa87027d2d99 (diff)
downloadmeson-80c89a650b6f2219583bddf51316777e12d5514c.zip
meson-80c89a650b6f2219583bddf51316777e12d5514c.tar.gz
meson-80c89a650b6f2219583bddf51316777e12d5514c.tar.bz2
Use find_program also in custom_target for consistency.
-rw-r--r--mesonbuild/interpreter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index c27a4e7..05af02a 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -4010,6 +4010,9 @@ external dependencies (including libraries) must go to "dependencies".''')
mlog.warning('''Custom target input \'%s\' can\'t be converted to File object(s).
This will become a hard error in the future.''' % kwargs['input'], location=self.current_node)
kwargs['env'] = self.unpack_env_kwarg(kwargs)
+ if 'command' in kwargs and isinstance(kwargs['command'], list) and kwargs['command']:
+ if isinstance(kwargs['command'][0], str):
+ kwargs['command'][0] = self.func_find_program(node, kwargs['command'][0], {})
tg = CustomTargetHolder(build.CustomTarget(name, self.subdir, self.subproject, kwargs, backend=self.backend), self)
self.add_target(name, tg.held_object)
return tg