fix phony rules depending on other phony rules
authorEvan Martin <martine@danga.com>
Mon, 29 Nov 2010 03:12:03 +0000 (19:12 -0800)
committerEvan Martin <martine@danga.com>
Mon, 29 Nov 2010 03:12:03 +0000 (19:12 -0800)
build.cc

index e700aa7..6f5c088 100644 (file)
--- a/build.cc
+++ b/build.cc
@@ -156,16 +156,13 @@ bool Builder::Build(string* err) {
   }
 
   do {
-    if (edge->rule_ == &State::kPhonyRule) {
-      plan_.EdgeFinished(edge);
-      continue;
-    }
-
-    if (!StartEdge(edge, err))
-      return false;
+    if (edge->rule_ != &State::kPhonyRule) {
+      if (!StartEdge(edge, err))
+        return false;
 
-    while (!(edge = command_runner_->NextFinishedCommand())) {
-      command_runner_->WaitForCommands(err);
+      while (!(edge = command_runner_->NextFinishedCommand())) {
+        command_runner_->WaitForCommands(err);
+      }
     }
 
     for (vector<Node*>::iterator i = edge->outputs_.begin();