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

+  def ComputeOutput(self, spec):
+    filename = self.ComputeOutputFileName(spec)
+
+    # Executables and loadable modules go into the output root.
+    if spec['type'] in ('executable', 'loadable_module'):
+      path = ''
+    elif spec['type'] == 'shared_library':
+      path = 'lib'
+    else:
+      # Everything else goes into our per-target dir.
+      path = self.base_dir
+
+    # XXX what are all these extra variables?
+    path = spec.get('product_dir', path)
+    assert 'product_prefix' not in spec
+    if 'product_name' in spec:
+      print 'XXX ignoring product_name'
+    assert 'product_extension' not in spec
+    #target_prefix = spec.get('product_prefix', target_prefix)
+    #target = spec.get('product_name', target)
+    #product_ext = spec.get('product_extension')
+
+    return '@' + os.path.join(path, filename)
+
+  def WriteRule(self, name, command, description=None):
+    self.WriteLn('rule %s' % name)

+
+  master_ninja.close()
+  OverPrint('done.\n')
Index: pylib/gyp/input.py
===================================================================
--- pylib/gyp/input.py	(revision 857)
+++ pylib/gyp/input.py	(working copy)
@@ -1512,7 +1512,7 @@
           target_dict['dependencies'].append(dependency)
 
 # Initialize this here to speed up MakePathRelative.
-exception_re = re.compile(r'''["']?[-/$<>]''')
+exception_re = re.compile(r'''["']?[-/$@<>]''')
 
 
 def MakePathRelative(to_file, fro_file, item):
@@ -1524,6 +1524,7 @@
   #   /   Used when a path is already absolute (shortcut optimization;
   #       such paths would be returned as absolute anyway)
   #   $   Used for build environment variables
+  #   @   Used for build environment variables
   #   -   Used for some build environment flags (such as -lapr-1 in a
   #       "libraries" section)
   #   <   Used for our own variable and command expansions (see ExpandVariables)
