diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-07 14:37:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-07 14:37:08 +0200 |
commit | 4854da9ba94fc107ff3dcd7eac4e12cecacd9b2e (patch) | |
tree | 44c7dceeb85132c65008f94b24888b8cfc7985e7 /build2/context.txx | |
parent | b7c0293598d45f052a41c3ed6580d98801280cd7 (diff) |
Remove the depdb (.d) files when cleaning
Diffstat (limited to 'build2/context.txx')
-rw-r--r-- | build2/context.txx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/build2/context.txx b/build2/context.txx index 566beb1..3233092 100644 --- a/build2/context.txx +++ b/build2/context.txx @@ -8,10 +8,15 @@ namespace build2 { template <typename T> fs_status<butl::rmfile_status> - rmfile (const path& f, const T& t) + rmfile (const path& f, const T& t, bool verbose) { using namespace butl; + // Verbosity thresholds. + // + uint16_t l1 (verbose ? 2 : 3); + uint16_t l2 (verbose ? 1 : 3); + // We don't want to print the command if we couldn't remove the // file because it does not exist (just like we don't print the // update command if the file is up to date). This makes the @@ -25,9 +30,9 @@ namespace build2 } catch (const system_error& e) { - if (verb >= 2) + if (verb >= l1) text << "rm " << f; - else if (verb) + else if (verb >= l2) text << "rm " << t; fail << "unable to remove file " << f << ": " << e.what (); @@ -35,9 +40,9 @@ namespace build2 if (rs == rmfile_status::success) { - if (verb >= 2) + if (verb >= l1) text << "rm " << f; - else if (verb) + else if (verb >= l2) text << "rm " << t; } |