aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-04-05 09:41:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-04-08 12:51:00 +0200
commit01d848149c22a69a62eada5fedc2406c54d95ba8 (patch)
tree66a3b59619f32f7f7244200f810f4d4cc9115ca5 /build2/algorithm.cxx
parent3392226a2248b5cd93a899afb986917ce9e7ad74 (diff)
Support for --dry-run|-n mode, perform update part
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r--build2/algorithm.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx
index 0dffb31..06ed922 100644
--- a/build2/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -1074,14 +1074,15 @@ namespace build2
{
// Normally will be there.
//
- try_rmbacklink (l, m);
+ if (!dry_run)
+ try_rmbacklink (l, m);
// Skip (ad hoc) targets that don't exist.
//
if (!(d ? dir_exists (p) : file_exists (p)))
return;
- for (;;) // Retry/fallback loop.
+ for (; !dry_run; ) // Retry/fallback loop.
try
{
switch (m)
@@ -1891,6 +1892,8 @@ namespace build2
// below 3. Note the first extra file/directory that actually got removed
// for diagnostics below.
//
+ // Note that dry-run is taken care of by the filesystem functions.
+ //
target_state er (target_state::unchanged);
bool ed (false);
path ep;