summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/parse/ast.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index dba4540f5e..6690dc51c2 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -335,6 +335,12 @@ def handleInherit(statements, filename, lineno, m):
335 classes = m.group(1) 335 classes = m.group(1)
336 statements.append(InheritNode(filename, lineno, classes)) 336 statements.append(InheritNode(filename, lineno, classes))
337 337
338def runAnonFuncs(d):
339 code = []
340 for funcname in d.getVar("__BBANONFUNCS", False) or []:
341 code.append("%s(d)" % funcname)
342 bb.utils.better_exec("\n".join(code), {"d": d})
343
338def finalize(fn, d, variant = None): 344def finalize(fn, d, variant = None):
339 saved_handlers = bb.event.get_handlers().copy() 345 saved_handlers = bb.event.get_handlers().copy()
340 346
@@ -349,10 +355,7 @@ def finalize(fn, d, variant = None):
349 bb.event.fire(bb.event.RecipePreFinalise(fn), d) 355 bb.event.fire(bb.event.RecipePreFinalise(fn), d)
350 356
351 bb.data.expandKeys(d) 357 bb.data.expandKeys(d)
352 code = [] 358 runAnonFuncs(d)
353 for funcname in d.getVar("__BBANONFUNCS", False) or []:
354 code.append("%s(d)" % funcname)
355 bb.utils.better_exec("\n".join(code), {"d": d})
356 359
357 tasklist = d.getVar('__BBTASKS', False) or [] 360 tasklist = d.getVar('__BBTASKS', False) or []
358 bb.event.fire(bb.event.RecipeTaskPreProcess(fn, list(tasklist)), d) 361 bb.event.fire(bb.event.RecipeTaskPreProcess(fn, list(tasklist)), d)