mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
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.
This commit is contained in:
@@ -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:]))])
|
||||
|
Reference in New Issue
Block a user