aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/parse
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/parse')
-rw-r--r--lib/bb/parse/ast.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py
index 547ea679..1180911a 100644
--- a/lib/bb/parse/ast.py
+++ b/lib/bb/parse/ast.py
@@ -308,12 +308,6 @@ def handleInherit(statements, filename, lineno, m):
def finalize(fn, d, variant = None):
bb.data.expandKeys(d)
- bb.data.update_data(d)
- code = []
- for funcname in bb.data.getVar("__BBANONFUNCS", d) or []:
- code.append("%s(d)" % funcname)
- bb.utils.simple_exec("\n".join(code), {"d": d})
- bb.data.update_data(d)
all_handlers = {}
for var in bb.data.getVar('__BBHANDLERS', d) or []:
@@ -321,6 +315,15 @@ def finalize(fn, d, variant = None):
handler = bb.data.getVar(var, d)
bb.event.register(var, handler)
+ bb.event.fire(bb.event.RecipePreFinalise(fn), d)
+
+ bb.data.update_data(d)
+ code = []
+ for funcname in bb.data.getVar("__BBANONFUNCS", d) or []:
+ code.append("%s(d)" % funcname)
+ bb.utils.simple_exec("\n".join(code), {"d": d})
+ bb.data.update_data(d)
+
tasklist = bb.data.getVar('__BBTASKS', d) or []
bb.build.add_tasks(tasklist, d)