diff options
Diffstat (limited to 'bitbake/lib/bb/parse/ast.py')
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index ed9c689afa..646a5b8d8e 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -56,13 +56,11 @@ class IncludeNode: | |||
56 | s = bb.data.expand(self.what_file, data) | 56 | s = bb.data.expand(self.what_file, data) |
57 | bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (self.from_fn, self.from_lineno, s)) | 57 | bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (self.from_fn, self.from_lineno, s)) |
58 | 58 | ||
59 | # TODO: Cache those includes... | 59 | # TODO: Cache those includes... maybe not here though |
60 | statements = StatementGroup() | ||
61 | if self.force: | 60 | if self.force: |
62 | bb.parse.ConfHandler.include(statements, self.from_fn, s, data, "include required") | 61 | bb.parse.ConfHandler.include(self.from_fn, s, data, "include required") |
63 | else: | 62 | else: |
64 | bb.parse.ConfHandler.include(statements, self.from_fn, s, data, False) | 63 | bb.parse.ConfHandler.include(self.from_fn, s, data, False) |
65 | #statements.eval(data) | ||
66 | 64 | ||
67 | class ExportNode: | 65 | class ExportNode: |
68 | def __init__(self, var): | 66 | def __init__(self, var): |
@@ -256,43 +254,30 @@ class InheritNode: | |||
256 | self.n = __word__.findall(files) | 254 | self.n = __word__.findall(files) |
257 | 255 | ||
258 | def eval(self, data): | 256 | def eval(self, data): |
259 | statements = StatementGroup() | 257 | bb.parse.BBHandler.inherit(self.n, data) |
260 | bb.parse.BBHandler.inherit(statements, self.n, data) | ||
261 | 258 | ||
262 | def handleInclude(statements, m, fn, lineno, data, force): | 259 | def handleInclude(statements, m, fn, lineno, force): |
263 | # AST handling | ||
264 | statements.append(IncludeNode(m.group(1), fn, lineno, force)) | 260 | statements.append(IncludeNode(m.group(1), fn, lineno, force)) |
265 | statements[-1].eval(data) | ||
266 | 261 | ||
267 | def handleExport(statements, m, data): | 262 | def handleExport(statements, m): |
268 | # AST handling | ||
269 | statements.append(ExportNode(m.group(1))) | 263 | statements.append(ExportNode(m.group(1))) |
270 | statements[-1].eval(data) | ||
271 | 264 | ||
272 | def handleData(statements, groupd, data): | 265 | def handleData(statements, groupd): |
273 | # AST handling | ||
274 | statements.append(DataNode(groupd)) | 266 | statements.append(DataNode(groupd)) |
275 | statements[-1].eval(data) | ||
276 | 267 | ||
277 | def handleMethod(statements, func_name, lineno, fn, body, d): | 268 | def handleMethod(statements, func_name, lineno, fn, body): |
278 | # AST handling | ||
279 | statements.append(MethodNode(func_name, body, lineno, fn)) | 269 | statements.append(MethodNode(func_name, body, lineno, fn)) |
280 | statements[-1].eval(d) | ||
281 | 270 | ||
282 | def handlePythonMethod(statements, root, body, fn): | 271 | def handlePythonMethod(statements, root, body, fn): |
283 | # AST handling | ||
284 | statements.append(PythonMethodNode(root, body, fn)) | 272 | statements.append(PythonMethodNode(root, body, fn)) |
285 | statements[-1].eval(None) | ||
286 | 273 | ||
287 | def handleMethodFlags(statements, key, m, d): | 274 | def handleMethodFlags(statements, key, m): |
288 | statements.append(MethodFlagsNode(key, m)) | 275 | statements.append(MethodFlagsNode(key, m)) |
289 | statements[-1].eval(d) | ||
290 | 276 | ||
291 | def handleExportFuncs(statements, m, classes, d): | 277 | def handleExportFuncs(statements, m, classes): |
292 | statements.append(ExportFuncsNode(m.group(1), classes)) | 278 | statements.append(ExportFuncsNode(m.group(1), classes)) |
293 | statements[-1].eval(d) | ||
294 | 279 | ||
295 | def handleAddTask(statements, m, d): | 280 | def handleAddTask(statements, m): |
296 | func = m.group("func") | 281 | func = m.group("func") |
297 | before = m.group("before") | 282 | before = m.group("before") |
298 | after = m.group("after") | 283 | after = m.group("after") |
@@ -300,17 +285,14 @@ def handleAddTask(statements, m, d): | |||
300 | return | 285 | return |
301 | 286 | ||
302 | statements.append(AddTaskNode(func, before, after)) | 287 | statements.append(AddTaskNode(func, before, after)) |
303 | statements[-1].eval(d) | ||
304 | 288 | ||
305 | def handleBBHandlers(statements, m, d): | 289 | def handleBBHandlers(statements, m): |
306 | statements.append(BBHandlerNode(m.group(1))) | 290 | statements.append(BBHandlerNode(m.group(1))) |
307 | statements[-1].eval(d) | ||
308 | 291 | ||
309 | def handleInherit(statements, m, d): | 292 | def handleInherit(statements, m): |
310 | files = m.group(1) | 293 | files = m.group(1) |
311 | n = __word__.findall(files) | 294 | n = __word__.findall(files) |
312 | statements.append(InheritNode(m.group(1))) | 295 | statements.append(InheritNode(m.group(1))) |
313 | statements[-1].eval(d) | ||
314 | 296 | ||
315 | def finalise(fn, d): | 297 | def finalise(fn, d): |
316 | bb.data.expandKeys(d) | 298 | bb.data.expandKeys(d) |