diff options
-rw-r--r-- | src/build.cc | 5 | ||||
-rw-r--r-- | src/build.h | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/build.cc b/src/build.cc index 6d23f3b..45f6849 100644 --- a/src/build.cc +++ b/src/build.cc @@ -362,11 +362,8 @@ void Plan::ResumeDelayedJobs(Edge* edge) { void Plan::EdgeFinished(Edge* edge) { map<Edge*, bool>::iterator i = want_.find(edge); assert(i != want_.end()); - if (i->second) { + if (i->second) --wanted_edges_; - if (!edge->is_phony()) - --command_edges_; - } want_.erase(i); edge->outputs_ready_ = true; diff --git a/src/build.h b/src/build.h index a872f6c..aa96512 100644 --- a/src/build.h +++ b/src/build.h @@ -51,7 +51,7 @@ struct Plan { Edge* FindWork(); /// Returns true if there's more work to be done. - bool more_to_do() const { return (command_edges_ > 0); } + bool more_to_do() const { return (wanted_edges_ > 0) && (command_edges_ > 0); } /// Dumps the current state of the plan. void Dump(); |