aboutsummaryrefslogtreecommitdiff
path: root/build/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-08 10:56:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-08 10:56:32 +0200
commiteb264e1892c2a1379fa3bcab9aefea219e8e7138 (patch)
tree1031f859076b2d8f117a2948ec1184a5536f9cbc /build/context.cxx
parent55471ef43695408bae2237374be4637c302d1c87 (diff)
Rework diagnostics verbosity, add quiet mode/option
Diffstat (limited to 'build/context.cxx')
-rw-r--r--build/context.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/build/context.cxx b/build/context.cxx
index fa1ea8f..5a801b0 100644
--- a/build/context.cxx
+++ b/build/context.cxx
@@ -126,12 +126,17 @@ namespace build
}
catch (const system_error& e)
{
- text << "mkdir " << d;
+ if (verb)
+ text << "mkdir " << d;
+
fail << "unable to create directory " << d << ": " << e.what ();
}
if (ms == mkdir_status::success)
- text << "mkdir " << d;
+ {
+ if (verb)
+ text << "mkdir " << d;
+ }
return ms;
}
@@ -150,12 +155,17 @@ namespace build
}
catch (const system_error& e)
{
- text << "mkdir -p " << d;
+ if (verb)
+ text << "mkdir -p " << d;
+
fail << "unable to create directory " << d << ": " << e.what ();
}
if (ms == mkdir_status::success)
- text << "mkdir -p " << d;
+ {
+ if (verb)
+ text << "mkdir -p " << d;
+ }
return ms;
}
@@ -171,7 +181,8 @@ namespace build
if (!dir_exists (d))
return rmdir_status::not_exist;
- text << "rmdir -r " << d;
+ if (verb)
+ text << "rmdir -r " << d;
try
{