diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-05 06:36:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-05 06:36:30 +0200 |
commit | 9ec2bdd87659438b4aa021a10c4a4977ef77118e (patch) | |
tree | 12580b4d0b82bce80047b067c3bb221b49be7449 /libbuild2/dump.cxx | |
parent | d280946474568925016359be742b59fd6c000c52 (diff) |
Add ability to specify ad hoc recipe actions
We are reusing the buildspec syntax for that.
Diffstat (limited to 'libbuild2/dump.cxx')
-rw-r--r-- | libbuild2/dump.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libbuild2/dump.cxx b/libbuild2/dump.cxx index 9f60900..11eb4b3 100644 --- a/libbuild2/dump.cxx +++ b/libbuild2/dump.cxx @@ -350,10 +350,21 @@ namespace build2 // if (!t.adhoc_recipes.empty ()) { + auto& re (*s.root_scope ()->root_extra); + for (const adhoc_recipe r: t.adhoc_recipes) { + os << endl + << ind << '%'; + + r.rule->dump_attributes (os); + + for (action a: r.actions) + os << ' ' << re.meta_operations[a.meta_operation ()]->name << + '(' << re.operations[a.operation ()]->name << ')'; + os << endl; - r.rule->dump (os, ind); // @@ TODO: pass action(s). + r.rule->dump_text (os, ind); } used = true; |