aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/build.py2
-rw-r--r--mesonbuild/interpreter.py6
2 files changed, 7 insertions, 1 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
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index a633917..4d41f1a 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -242,11 +242,15 @@ class ExternalProgramHolder(InterpreterObject):
def __init__(self, ep):
InterpreterObject.__init__(self)
self.held_object = ep
- self.methods.update({'found': self.found_method})
+ self.methods.update({'found': self.found_method,
+ 'path': self.path_method})
def found_method(self, args, kwargs):
return self.found()
+ def path_method(self, args, kwargs):
+ return self.get_command()
+
def found(self):
return self.held_object.found()