From 5ab4bc13f618b75937dce33d497e370b212561c2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Feb 2018 18:27:00 +0200 Subject: Make dist diagnostics tidier yet --- build2/context.hxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build2/context.hxx') diff --git a/build2/context.hxx b/build2/context.hxx index 7702564..846dee2 100644 --- a/build2/context.hxx +++ b/build2/context.hxx @@ -296,6 +296,13 @@ namespace build2 extern execution_mode current_mode; + // Some diagnostics (for example output directory creation/removal by the + // fsdir rule) is just noise at verbosity level 1 unless it is the only + // thing that is printed. So we can only suppress it in certain situations + // (e.g., dist) where we know we have already printed something. + // + extern bool current_diag_noise; + // Total number of dependency relationships and targets with non-noop // recipe in the current action. // @@ -322,13 +329,15 @@ namespace build2 inline void set_current_oif (const operation_info& inner_oif, - const operation_info* outer_oif = nullptr) + const operation_info* outer_oif = nullptr, + bool diag_noise = true) { current_oname = (outer_oif == nullptr ? inner_oif : *outer_oif).name; current_inner_oif = &inner_oif; current_outer_oif = outer_oif; current_on++; current_mode = inner_oif.mode; + current_diag_noise = diag_noise; // Reset counters (serial execution). // -- cgit v1.1