diff options
author | Chris Johns <chrisj@rtems.org> | 2014-05-13 23:26:09 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-05-13 23:26:09 +1000 |
commit | 9a15c40e1b2ac56a678e79519e1e78160009af92 (patch) | |
tree | 308f3f407a06c4073612b813d4d40ed0c5c5c60e /source-builder/sb/config.py | |
parent | 4.11/rtems-lm32: Use gcc-4.9.0 and fix gdb simulator build on Windows. (diff) | |
download | rtems-source-builder-9a15c40e1b2ac56a678e79519e1e78160009af92.tar.bz2 |
sb: Implement %source and %patch to manage source and patches.
Remove the numbered source and patches and automatically manage
sources and patches. This removes the overhead in maintaining large
collections of patches.
Diffstat (limited to 'source-builder/sb/config.py')
-rw-r--r-- | source-builder/sb/config.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py index 5a90a49..9a70155 100644 --- a/source-builder/sb/config.py +++ b/source-builder/sb/config.py @@ -37,6 +37,7 @@ try: import options import path import pkgconfig + import sources except KeyboardInterrupt: print 'user terminated' sys.exit(1) @@ -580,6 +581,9 @@ class file: log.trace('config: %s: _select: %s %s %r' % \ (self.init_name, r, ls[1], self.macros.maps())) + def _sources(self, ls): + return sources.process(ls[0][1:], ls[1:], self.macros, self._error) + def _define(self, config, ls): if len(ls) <= 1: log.warning('invalid macro definition') @@ -796,6 +800,14 @@ class file: elif ls[0] == '%select': if isvalid: self._select(config, ls) + elif ls[0] == '%source' or ls[0] == '%patch': + if isvalid: + d = self._sources(ls) + if d is not None: + return ('data', d) + elif ls[0] == '%patch': + if isvalid: + self._select(config, ls) elif ls[0] == '%error': if isvalid: return ('data', ['%%error %s' % (self._name_line_msg(l[7:]))]) |