 +        if dep:
 +          prebuild_deps.append(dep)
 +    if prebuild_deps:
-+      self.prebuild_stamp = spec['target_name'] + '.predepends.stamp'
++      self.prebuild_stamp = self.OutputPath(self.FullPath(
++          spec['target_name'] + '.predepends.stamp'))
 +      self.WriteEdge([self.prebuild_stamp], 'stamp', prebuild_deps,
 +                     use_prebuild_stamp=False)
 +      self.WriteLn()

+  def ComputeOutput(self, spec):
+    filename = self.ComputeOutputFileName(spec)
+
+    # XXX what are all these extra variables?
+    path = spec.get('product_dir', '')
+    assert 'product_prefix' not in spec
+    if 'product_name' in spec:
+      print 'XXX ignoring product_name'

+  'SHARED_INTERMEDIATE_DIR': '@gen',
+  'PRODUCT_DIR': '@',
+  'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)',
+  'LIB_DIR': '@',
+  'RULE_INPUT_ROOT': '$root',
+  'RULE_INPUT_PATH': '$source',
+  'RULE_INPUT_EXT': '$ext',
