From 9ec2bdd87659438b4aa021a10c4a4977ef77118e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 5 Jun 2020 06:36:30 +0200 Subject: Add ability to specify ad hoc recipe actions We are reusing the buildspec syntax for that. --- libbuild2/dump.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libbuild2/dump.cxx') 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; -- cgit v1.1