 +      for dep in deps:
 +        extra_deps.update(self.target_links.get(dep, set()))
 +      link_deps.extend(list(extra_deps))
-+    print output, 'links', link_deps
 +    command_map = {
 +      'executable':      'link',
 +      'static_library':  'alink',

+      inputs = [self.InputPath(i) for i in action['inputs']]
+      if int(action.get('process_outputs_as_sources', False)):
+        extra_sources += action['outputs']
+      outputs = [self.OutputPath(o) for o in action['outputs']]
+
+      # 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, use_prebuild_stamp=False)
+
+      self.WriteLn()
+

+
+rule copy
+  description = COPY $out
+  command = ln -f $in $out || cp -af $in $out
+
+""" % {
+  'cwd': os.getcwd(),
