 +      # Then write out an edge using the rule.
 +      self.WriteEdge(outputs, name, inputs)
 +      all_outputs += outputs
++
++      # And a phony edge to run the action by name.
++      self.WriteEdge([name], 'phony', outputs)
 +
 +      self.WriteLn()
 +

   TestGypSCons,
   TestGypXcode,
 ]
Index: pylib/gyp/generator/ninja.py
===================================================================
--- pylib/gyp/generator/ninja.py	(revision 0)
+++ pylib/gyp/generator/ninja.py	(revision 0)
@@ -0,0 +1,358 @@
+#!/usr/bin/python
+
+# Copyright (c) 2010 Google Inc. All rights reserved.

+    print >>master_ninja, 'subninja', ninja
+
+  if all_outputs:
+    print >>master_ninja, 'build all: phony |' + ' '.join(all_outputs)
+
+  master_ninja.close()
+  OverPrint('done.\n')
