parameters: (self, copies, extra_outputs)
docstring: Write Makefile code for any 'copies' from the gyp input.
  
      extra_outputs: a list that will be filled in with any outputs of this action
                     (used to make other pieces dependent on this action)
docstring_summary: Write Makefile code for any 'copies' from the gyp input.
docstring_tokens: Write Makefile code for any copies from the gyp input .
function: def WriteCopies(self, copies, extra_outputs):
      """Write Makefile code for any 'copies' from the gyp input.
  
      extra_outputs: a list that will be filled in with any outputs of this action
                     (used to make other pieces dependent on this action)
      """
      self.WriteLn('### Generated for copy rule.')
  
      variable = make.StringToMakefileVariable(self.relative_target + '_copies')
      outputs = []
      for copy in copies:
        for path in copy['files']:
          # The Android build system does not allow generation of files into the
          # source tree. The destination should start with a variable, which will
          # typically be $(gyp_intermediate_dir) or
          # $(gyp_shared_intermediate_dir). Note that we can't use an assertion
          # because some of the gyp tests depend on this.
          if not copy['destination'].startswith('$'):
            print ('WARNING: Copy rule for target %s writes output to '
                   'local path %s' % (self.target, copy['destination']))
  
          # LocalPathify() calls normpath, stripping trailing slashes.
          path = Sourceify(self.LocalPathify(path))
          filename = os.path.split(path)[1]
          output = Sourceify(self.LocalPathify(os.path.join(copy['destination'],
                                                            filename)))
  
          self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES) | $(ACP)' %
                       (output, path))
          self.WriteLn('\t@echo Copying: $@')
          self.WriteLn('\t$(hide) mkdir -p $(dir $@)')
          self.WriteLn('\t$(hide) $(ACP) -rpf $< $@')
          self.WriteLn()
          outputs.append(output)
      self.WriteLn('%s = %s' % (variable,
                                ' '.join(map(make.QuoteSpaces, outputs))))
      extra_outputs.append('$(%s)' % variable)
      self.WriteLn()
function_tokens: def WriteCopies ( self , copies , extra_outputs ) : self . WriteLn ( '### Generated for copy rule.' ) variable = make . StringToMakefileVariable ( self . relative_target + '_copies' ) outputs = [ ] for copy in copies : for path in copy [ 'files' ] : # The Android build system does not allow generation of files into the # source tree. The destination should start with a variable, which will # typically be $(gyp_intermediate_dir) or # $(gyp_shared_intermediate_dir). Note that we can't use an assertion # because some of the gyp tests depend on this. if not copy [ 'destination' ] . startswith ( '$' ) : print ( 'WARNING: Copy rule for target %s writes output to ' 'local path %s' % ( self . target , copy [ 'destination' ] ) ) # LocalPathify() calls normpath, stripping trailing slashes. path = Sourceify ( self . LocalPathify ( path ) ) filename = os . path . split ( path ) [ 1 ] output = Sourceify ( self . LocalPathify ( os . path . join ( copy [ 'destination' ] , filename ) ) ) self . WriteLn ( '%s: %s $(GYP_TARGET_DEPENDENCIES) | $(ACP)' % ( output , path ) ) self . WriteLn ( '\t@echo Copying: $@' ) self . WriteLn ( '\t$(hide) mkdir -p $(dir $@)' ) self . WriteLn ( '\t$(hide) $(ACP) -rpf $< $@' ) self . WriteLn ( ) outputs . append ( output ) self . WriteLn ( '%s = %s' % ( variable , ' ' . join ( map ( make . QuoteSpaces , outputs ) ) ) ) extra_outputs . append ( '$(%s)' % variable ) self . WriteLn ( )