diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-12-09 20:26:12 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-12-09 20:26:12 +0200 |
commit | 11c812769af05126732d65bf6bf6da97afd42b1c (patch) | |
tree | 9d69067617d75480653b1a25b5070c5d59192577 /optinterpreter.py | |
parent | 374ffe9f86024a6e579345276e1d1798ecf6404a (diff) | |
download | meson-11c812769af05126732d65bf6bf6da97afd42b1c.zip meson-11c812769af05126732d65bf6bf6da97afd42b1c.tar.gz meson-11c812769af05126732d65bf6bf6da97afd42b1c.tar.bz2 |
Can haz subproject options.
Diffstat (limited to 'optinterpreter.py')
-rw-r--r-- | optinterpreter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/optinterpreter.py b/optinterpreter.py index 154b5fe..756ec5f 100644 --- a/optinterpreter.py +++ b/optinterpreter.py @@ -69,8 +69,9 @@ option_types = {'string' : UserStringOption, } class OptionInterpreter: - def __init__(self): + def __init__(self, subproject): self.options = {} + self.subproject = subproject def process(self, option_file): try: @@ -137,6 +138,8 @@ class OptionInterpreter: opt_name = posargs[0] if not isinstance(opt_name, str): raise OptionException('Positional argument must be a string.') + if self.subproject != '': + opt_name = self.subproject + '-' + opt_name opt = option_types[opt_type](kwargs) if opt.description == '': opt.description = opt_name |