aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-11-20 22:07:37 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-12-02 17:31:04 +0300
commit0ff39fd77b3127c7a250e7f817e34dfaecbcc208 (patch)
treeedb20351f3d44558201b5668823c191a8722d3a5 /libbuild2/parser.cxx
parent41a6f8b7d3036708f36ea1b5bd5b8d4289428fe5 (diff)
Add support for buildscript depdb preamble
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r--libbuild2/parser.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx
index 8676c9d..92e0090 100644
--- a/libbuild2/parser.cxx
+++ b/libbuild2/parser.cxx
@@ -1236,17 +1236,6 @@ namespace build2
if (!skip)
{
- if (d.first)
- {
- if (ar->recipe_text (ctx, *target_, move (t.value), d.as))
- d.clean = true;
-
- // Verify we have no unhandled attributes.
- //
- for (attribute& a: d.as)
- fail (d.as.loc) << "unknown recipe attribute " << a << endf;
- }
-
auto& ars (target_->adhoc_recipes);
ars.push_back (adhoc_recipe {{}, move (ar)});
@@ -1315,6 +1304,20 @@ namespace build2
ars.back ().actions.push_back (a);
}
}
+
+ if (d.first)
+ {
+ adhoc_recipe& ar (ars.back ());
+
+ if (ar.rule->recipe_text (
+ ctx, *target_, ar.actions, move (t.value), d.as))
+ d.clean = true;
+
+ // Verify we have no unhandled attributes.
+ //
+ for (attribute& a: d.as)
+ fail (d.as.loc) << "unknown recipe attribute " << a << endf;
+ }
}
next (t, tt);