aboutsummaryrefslogtreecommitdiff
path: root/build/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-12 15:43:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-12 15:43:17 +0200
commitcf6b3e34b59ad120111e0c1ead779bbb3a70c38d (patch)
tree424e9def98c65d9080e72a69064334c6716fb82b /build/b.cxx
parent5925c11a1fe8b2e02b790dd40b031ae005d5b68f (diff)
Implement clean operation
Diffstat (limited to 'build/b.cxx')
-rw-r--r--build/b.cxx22
1 files changed, 5 insertions, 17 deletions
diff --git a/build/b.cxx b/build/b.cxx
index 499ac10..0764622 100644
--- a/build/b.cxx
+++ b/build/b.cxx
@@ -515,11 +515,8 @@ main (int argc, char* argv[])
target& t (**i);
- if (!t.recipe (act))
- {
- level4 ([&]{trace << "matching target " << t;});
- match (act, t);
- }
+ level4 ([&]{trace << "matching target " << t;});
+ match (act, t);
tgs.push_back (t);
}
@@ -530,18 +527,9 @@ main (int argc, char* argv[])
//
for (target& t: tgs)
{
- // The target might have already been updated indirectly. We
- // still want to inform the user about its status since they
- // requested its update explicitly.
- //
- target_state s (t.state ());
- if (s == target_state::unknown)
- {
- level4 ([&]{trace << "updating target " << t;});
- s = execute (act, t);
- }
+ level4 ([&]{trace << "updating target " << t;});
- switch (s)
+ switch (execute (act, t))
{
case target_state::unchanged:
{
@@ -552,7 +540,7 @@ main (int argc, char* argv[])
break;
case target_state::failed:
//@@ This could probably happen in a parallel build.
- case target_state::unknown:
+ default:
assert (false);
}
}