 +      sources_predepends.append(
 +        self.WriteActions(local_name, spec['actions'], extra_sources))
 +
++    if 'rules' in spec:
++      self.WriteRules(local_name, spec['rules'], extra_sources)
++
 +    link_deps = []
 +    sources = spec.get('sources', []) + extra_sources
 +    if sources:

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

+  'PRODUCT_DIR': '@',
+  'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)',
+  'LIB_DIR': '$(obj).$(TOOLSET)',
+  'RULE_INPUT_ROOT': '%(basename)s',
+  'RULE_INPUT_PATH': '$in',
+  'RULE_INPUT_EXT': 'XXXNINJAXXX',
+  'RULE_INPUT_NAME': 'XXXNINJAXXX',
+
+  # This appears unused --- ?
+  'CONFIGURATION_NAME': '$(BUILDTYPE)',
