diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-02-13 14:58:35 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-02-17 14:45:50 +0530 |
commit | 36c9a165ed50df6a173cbd0815f6ff39e5b15355 (patch) | |
tree | 59f1eadc343c3844e111986c650956be942b4e0d | |
parent | edd61dcf816bba751acf44583a1b4162bb37ea8f (diff) | |
download | meson-36c9a165ed50df6a173cbd0815f6ff39e5b15355.zip meson-36c9a165ed50df6a173cbd0815f6ff39e5b15355.tar.gz meson-36c9a165ed50df6a173cbd0815f6ff39e5b15355.tar.bz2 |
build.CustomTarget: Also accept mesonlib.File types as 'command' arguments
-rw-r--r-- | mesonbuild/build.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index c0ba895..f9e628d 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -808,6 +808,8 @@ class CustomTarget: if not isinstance(s, str): raise InvalidArguments('Array as argument %d contains a non-string.' % i) final_cmd.append(s) + elif isinstance(c, File): + final_cmd.append(os.path.join(c.subdir, c.fname)) else: raise InvalidArguments('Argument %s in "command" is invalid.' % i) self.command = final_cmd |