parameters: (spec, generator_flags, gyp_file)
return_statement: return (sources, excluded_sources)
docstring: Prepare list of sources and excluded sources.
  
    Besides the sources specified directly in the spec, adds the gyp file so
    that a change to it will cause a re-compile. Also adds appropriate sources
    for actions and copies. Assumes later stage will un-exclude files which
    have custom build steps attached.
  
    Arguments:
      spec: The target dictionary containing the properties of the target.
      gyp_file: The name of the gyp file.
    Returns:
      A pair of (list of sources, list of excluded sources).
      The sources will be relative to the gyp file.
docstring_summary: Prepare list of sources and excluded sources.
docstring_tokens: Prepare list of sources and excluded sources .
function: def _PrepareListOfSources(spec, generator_flags, gyp_file):
      """Prepare list of sources and excluded sources.
  
    Besides the sources specified directly in the spec, adds the gyp file so
    that a change to it will cause a re-compile. Also adds appropriate sources
    for actions and copies. Assumes later stage will un-exclude files which
    have custom build steps attached.
  
    Arguments:
      spec: The target dictionary containing the properties of the target.
      gyp_file: The name of the gyp file.
    Returns:
      A pair of (list of sources, list of excluded sources).
      The sources will be relative to the gyp file.
    """
      sources = OrderedSet()
      _AddNormalizedSources(sources, spec.get("sources", []))
      excluded_sources = OrderedSet()
      # Add in the gyp file.
      if not generator_flags.get("standalone"):
          sources.add(gyp_file)
  
      # Add in 'action' inputs and outputs.
      for a in spec.get("actions", []):
          inputs = a["inputs"]
          inputs = [_NormalizedSource(i) for i in inputs]
          # Add all inputs to sources and excluded sources.
          inputs = OrderedSet(inputs)
          sources.update(inputs)
          if not spec.get("msvs_external_builder"):
              excluded_sources.update(inputs)
          if int(a.get("process_outputs_as_sources", False)):
              _AddNormalizedSources(sources, a.get("outputs", []))
      # Add in 'copies' inputs and outputs.
      for cpy in spec.get("copies", []):
          _AddNormalizedSources(sources, cpy.get("files", []))
      return (sources, excluded_sources)
function_tokens: def _PrepareListOfSources ( spec , generator_flags , gyp_file ) : sources = OrderedSet ( ) _AddNormalizedSources ( sources , spec . get ( "sources" , [ ] ) ) excluded_sources = OrderedSet ( ) # Add in the gyp file. if not generator_flags . get ( "standalone" ) : sources . add ( gyp_file ) # Add in 'action' inputs and outputs. for a in spec . get ( "actions" , [ ] ) : inputs = a [ "inputs" ] inputs = [ _NormalizedSource ( i ) for i in inputs ] # Add all inputs to sources and excluded sources. inputs = OrderedSet ( inputs ) sources . update ( inputs ) if not spec . get ( "msvs_external_builder" ) : excluded_sources . update ( inputs ) if int ( a . get ( "process_outputs_as_sources" , False ) ) : _AddNormalizedSources ( sources , a . get ( "outputs" , [ ] ) ) # Add in 'copies' inputs and outputs. for cpy in spec . get ( "copies" , [ ] ) : _AddNormalizedSources ( sources , cpy . get ( "files" , [ ] ) ) return ( sources , excluded_sources )