summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder/sb/config.py')
-rw-r--r--source-builder/sb/config.py12
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:]))])