aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-11-28 19:47:52 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-12-02 16:26:08 +0200
commit913963d608a419a336473203c3167987f8c15060 (patch)
tree147b9b9399f1ad87f73ed0abb28a14dc20173e41 /interpreter.py
parent2024d9d237e5c588e626e721a1535bee3ee7bd2b (diff)
downloadmeson-913963d608a419a336473203c3167987f8c15060.zip
meson-913963d608a419a336473203c3167987f8c15060.tar.gz
meson-913963d608a419a336473203c3167987f8c15060.tar.bz2
Can specify extra arguments to generator commands. Closes #315.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/interpreter.py b/interpreter.py
index 46b9f05..d60de83 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -290,18 +290,17 @@ class GeneratorHolder(InterpreterObject):
self.methods.update({'process' : self.process_method})
def process_method(self, args, kwargs):
- if len(kwargs) > 0:
- raise InvalidArguments('Process does not take keyword arguments.')
check_stringlist(args)
- gl = GeneratedListHolder(self)
+ extras = mesonlib.stringlistify(kwargs.get('extra_args', []))
+ gl = GeneratedListHolder(self, extras)
[gl.add_file(os.path.join(self.interpreter.subdir, a)) for a in args]
return gl
class GeneratedListHolder(InterpreterObject):
- def __init__(self, arg1):
+ def __init__(self, arg1, extra_args=[]):
super().__init__()
if isinstance(arg1, GeneratorHolder):
- self.held_object = build.GeneratedList(arg1.held_object)
+ self.held_object = build.GeneratedList(arg1.held_object, extra_args)
else:
self.held_object = arg1