def generate(self, name, opts=None, macros=None): self.bset_nesting += 1 self.buildset_start(name) if opts is None: opts = self.opts if macros is None: macros = self.macros bset = setbuilder.buildset(name, self.configs, opts, macros) for c in bset.load(): if c.endswith(".bset"): self.buildset(c, bset.opts, bset.macros) elif c.endswith(".cfg"): self.config(config.file(c, bset.opts, bset.macros), bset.opts, bset.macros) else: raise error.general("invalid config type: %s" % (c)) self.buildset_end(name) self.bset_nesting -= 1
def generate(self, name, tree = None, opts = None, defaults = None): self.bset_nesting += 1 self.buildset_start(name) if tree is None: tree = self.tree if opts is None: opts = self.opts bset = setbuilder.buildset(name, self.configs, opts, defaults) if name in tree: raise error.general('duplicate build set in tree: %s' % (name)) tree[name] = { 'bset': { }, 'cfg': { 'file': [] } } for c in bset.load(): macros = copy.copy(bset.macros) if c.endswith('.bset'): self.generate(c, tree[name]['bset'], bset.opts, macros) elif c.endswith('.cfg'): self.config(config.file(c, bset.opts, macros), tree[name]['cfg'], bset.opts, macros) else: raise error.general('invalid config type: %s' % (c)) self.buildset_end(name) self.bset_nesting -= 1
def generate(self, name, tree=None, opts=None, macros=None): self.bset_nesting += 1 self.buildset_start(name) if tree is None: tree = self.tree if opts is None: opts = self.opts if macros is None: macros = self.macros bset = setbuilder.buildset(name, self.configs, opts, macros) if name in tree: raise error.general('duplicate build set in tree: %s' % (name)) tree[name] = {'bset': {}, 'cfg': {'file': []}} for c in bset.load(): macros = copy.copy(bset.macros) if c.endswith('.bset'): self.generate(c, tree[name]['bset'], bset.opts, macros) elif c.endswith('.cfg'): self.config(config.file(c, bset.opts, macros), tree[name]['cfg'], bset.opts, macros) else: raise error.general('invalid config type: %s' % (c)) self.buildset_end(name) self.bset_nesting -= 1