martine/ninja — pull request #704 by dpwright (2014-01-15 05:49:48+00:00)
Title: Support dependencies defined with one rule per dependency

ARM's RVCT compiler outputs dependency files with one rule for each dependency, like so:

```make
foo.o: foo.cpp
foo.o: foo.h
foo.o: bar.h
# ...etc
```

The existing dependency file parser would treat these repeated instances of foo.o as dependencies, and identify this as a circular dependency.

This patch resets the "parsing_targets" flag when we encounter a non-indented line after a non-escaped newline in a rule, and if the later targets match the first one, drops them and continues reading dependencies. If they don't match (i.e. the dependency file defines dependencies for more than one target), the parser fails as before.