mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Build Sets can reference other build sets.
A build set can invoke another build set. This allows an 'all' type build set that builds all the RTEMS archs. Change the get config call to return a map of paths and files.
This commit is contained in:
@@ -466,29 +466,24 @@ class build:
|
||||
package = packages['main']
|
||||
return package.name()
|
||||
|
||||
def get_configs(opts, _defaults, ext = '.cfg'):
|
||||
def get_configs(opts, _defaults):
|
||||
|
||||
def _scan(_path, ext):
|
||||
configs = []
|
||||
for root, dirs, files in os.walk(_path):
|
||||
prefix = root[len(_path) + 1:]
|
||||
for file in files:
|
||||
if file.endswith(ext):
|
||||
configs += [path.join(prefix, file)]
|
||||
for e in ext:
|
||||
if file.endswith(e):
|
||||
configs += [path.join(prefix, file)]
|
||||
return configs
|
||||
|
||||
paths = []
|
||||
configs = []
|
||||
files = []
|
||||
configs = { 'paths': [], 'files': [] }
|
||||
for cp in opts.expand('%{_configdir}', _defaults).split(':'):
|
||||
paths += [path.host(path.abspath(cp))]
|
||||
files += _scan(cp, ext)
|
||||
for f in sorted(files):
|
||||
config = f
|
||||
if config.endswith(ext):
|
||||
config = config[:0 - len(ext)]
|
||||
configs += [config]
|
||||
return paths, configs
|
||||
configs['paths'] += [path.host(path.abspath(cp))]
|
||||
configs['files'] += _scan(cp, ['.cfg', '.bset'])
|
||||
configs['files'] = sorted(configs['files'])
|
||||
return configs
|
||||
|
||||
def run(args):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user