diff options
Diffstat (limited to 'src/state.cc')
-rw-r--r-- | src/state.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/state.cc b/src/state.cc index 0426b85..a70f211 100644 --- a/src/state.cc +++ b/src/state.cc @@ -140,17 +140,13 @@ void State::AddIn(Edge* edge, StringPiece path, unsigned int slash_bits) { node->AddOutEdge(edge); } -void State::AddOut(Edge* edge, StringPiece path, unsigned int slash_bits) { +bool State::AddOut(Edge* edge, StringPiece path, unsigned int slash_bits) { Node* node = GetNode(path, slash_bits); - if (node->in_edge()) { - Warning("multiple rules generate %s. " - "builds involving this target will not be correct; " - "continuing anyway", - path.AsString().c_str()); - return; - } + if (node->in_edge()) + return false; edge->outputs_.push_back(node); node->set_in_edge(edge); + return true; } bool State::AddDefault(StringPiece path, string* err) { |