diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-03-13 12:00:22 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-03-24 22:50:10 +0200 |
commit | 80c89a650b6f2219583bddf51316777e12d5514c (patch) | |
tree | 1810cd8e16c867bd216d2178d399709af1674490 | |
parent | 9b27d110d1e9dac576e459f222bcfa87027d2d99 (diff) | |
download | meson-80c89a650b6f2219583bddf51316777e12d5514c.zip meson-80c89a650b6f2219583bddf51316777e12d5514c.tar.gz meson-80c89a650b6f2219583bddf51316777e12d5514c.tar.bz2 |
Use find_program also in custom_target for consistency.
-rw-r--r-- | mesonbuild/interpreter.py | 3 |
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 |