aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-02-13 14:58:35 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-02-17 14:45:50 +0530
commit36c9a165ed50df6a173cbd0815f6ff39e5b15355 (patch)
tree59f1eadc343c3844e111986c650956be942b4e0d
parentedd61dcf816bba751acf44583a1b4162bb37ea8f (diff)
downloadmeson-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.py2
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