martine/ninja — pull request #634 by rgeary1 (2013-08-11 16:22:22+00:00)
Title: Fix for issue #478. Mtime of output of phony edges should be the latest mtime of its inputs

Observed : Real edges depending on a phony edge will not be marked as dirty or rebuilt if the phony's (real) inputs are updated
Expected : An edge should always be rebuilt if its inputs or transitive inputs are newer than the output's mtime

Change : Node::mtime_ was overloaded, 0 represented "does not exist". This change disambiguates it by adding Node::exists_. Then to fix the observed behaviour, Node::UpdatePhonyMtime was added to update the mtime if the node does not exist.

I've added tests BuildTest.PhonyUseCase# GraphTest.PhonyDepsMtimes
Unit tests will also test for always-dirty behaviour if a phony rule has no inputs