(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)
Write Makefile code for any 'copies' from the gyp input.
Write Makefile code for any copies from the gyp input .
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) -r $< $@')
        self.WriteLn()
        outputs.append(output)
    self.WriteLn('%s = %s' % (variable,
                              ' '.join(map(make.QuoteSpaces, outputs))))
    extra_outputs.append('$(%s)' % variable)
    self.WriteLn()
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) -r $< $@' ) self . WriteLn ( ) outputs . append ( output ) self . WriteLn ( '%s = %s' % ( variable , ' ' . join ( map ( make . QuoteSpaces , outputs ) ) ) ) extra_outputs . append ( '$(%s)' % variable ) self . WriteLn ( )