martine/ninja — pull request #447 by maximuska (2012-10-12 08:13:40+00:00)
Title: Proposed/clean orphans

Use case:
Checked out a new branch in git with source files renamed / removed.
It's desired to remove old targets which are not relevant to the current source tree and preserve targets which are relevant.
That is, instead of: ./rebuild_manifest && ninja it's: ./rebuild_manifest && ninja -t clean ^ && ninja

Chosing was between doing this part of our metabuild sub-system or in ninja I decided for ninja because:
* It's a relatively common problem. It's better to implement it in a single place than in the multiple metabuild systems if the price is good.
* Performance cost turned out being not measurable (at least on our mid-sized project).