From 8a8628cc5ca1ba198e96d7808afc5875a5043bbc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 29 May 2020 15:01:15 +0200 Subject: Move low-verbosity command name from adhoc_script_rule to script --- libbuild2/rule.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'libbuild2/rule.cxx') diff --git a/libbuild2/rule.cxx b/libbuild2/rule.cxx index 773d42e..2e5fe5d 100644 --- a/libbuild2/rule.cxx +++ b/libbuild2/rule.cxx @@ -365,14 +365,18 @@ namespace build2 { // Do we need the header? // - if (diag) + // @@ TODO: for now we dump it as an attribute whether it was specified or + // derived from the script. Maybe that's ok? + // + if (script.diag) { os << ind << '%'; - if (diag) + if (script.diag) { os << " ["; - os << "diag="; to_stream (os, name (*diag), true /* quote */, '@'); + os << "diag="; + to_stream (os, name (*script.diag), true /* quote */, '@'); os << ']'; } @@ -612,7 +616,7 @@ namespace build2 if (verb == 1) { - // @@ TODO: + // @@ TODO (and below): // // - derive diag if absent (should probably do in match?) // @@ -624,7 +628,7 @@ namespace build2 // (including tools)? // - text << (diag ? diag->c_str () : "adhoc") << ' ' << t; + text << (script.diag ? script.diag->c_str () : "adhoc") << ' ' << t; } if (!ctx.dry_run || verb >= 2) @@ -657,7 +661,7 @@ namespace build2 { // @@ TODO: as above - text << (diag ? diag->c_str () : "adhoc") << ' ' << t; + text << (script.diag ? script.diag->c_str () : "adhoc") << ' ' << t; } if (!ctx.dry_run || verb >= 2) -- cgit v1.1