summaryrefslogtreecommitdiffstats
path: root/src/state.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.cc')
-rw-r--r--src/state.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state.cc b/src/state.cc
index 89f90c0..18c0c8c 100644
--- a/src/state.cc
+++ b/src/state.cc
@@ -141,13 +141,14 @@ void State::AddIn(Edge* edge, StringPiece path, unsigned int slash_bits) {
void State::AddOut(Edge* edge, StringPiece path, unsigned int slash_bits) {
Node* node = GetNode(path, slash_bits);
- edge->outputs_.push_back(node);
if (node->in_edge()) {
Warning("multiple rules generate %s. "
"builds involving this target will not be correct; "
"continuing anyway",
path.AsString().c_str());
+ return;
}
+ edge->outputs_.push_back(node);
node->set_in_edge(edge);
}