when an edge is dirty, mark all outputs dirty
authorEvan Martin <martine@danga.com>
Sun, 4 Dec 2011 21:07:11 +0000 (13:07 -0800)
committerEvan Martin <martine@danga.com>
Sun, 4 Dec 2011 21:07:11 +0000 (13:07 -0800)
commitf39ebbfa26105a8e0ae7a7cad0246d009b0d29d0
tree4041e161232be7d9c6665363e8da40d1f59291af
parentd412c2cfec1f8cd4d6a94a895773fb7c562c839c
when an edge is dirty, mark all outputs dirty

The logic before was like:
  for each output:
    if edge_dirty or output.dirty:
      output.dirty = true
      edge_dirty = true

This was wrong in the case where the second output would case the edge
to be dirty; we needed to go back and mark the first output dirty as
well.  Fixed by taking two passes: one to compute the dirty state,
then a latter sweep to mark all outputs.

Fixes issue 148.
src/build_test.cc
src/graph.cc