original_docstring: Pseudo-builder for library to handle platform-dependent type.
  
    Args:
      self: Environment in which we were called.
      lib_name: Library name.
      args: Positional arguments.
      kwargs: Keyword arguments.
  
    Returns:
      Passthrough return code from env.StaticLibrary() or env.SharedLibrary().
    
docstring: Pseudo-builder for library to handle platform-dependent type.
docstring_tokens: Pseudo - builder for library to handle platform - dependent type .
code: def ComponentLibrary(self, lib_name, *args, **kwargs):
    """Pseudo-builder for library to handle platform-dependent type.
  
    Args:
      self: Environment in which we were called.
      lib_name: Library name.
      args: Positional arguments.
      kwargs: Keyword arguments.
  
    Returns:
      Passthrough return code from env.StaticLibrary() or env.SharedLibrary().
    """
    # Clone and modify environment
    env = _ComponentPlatformSetup(self, 'ComponentLibrary', **kwargs)
  
    # Make appropriate library type
    if env.get('COMPONENT_STATIC'):
      lib_outputs = env.StaticLibrary(lib_name, *args, **kwargs)
    else:
      lib_outputs = env.SharedLibrary(lib_name, *args, **kwargs)
  
    # Add dependencies on includes
    env.Depends(lib_outputs, env['INCLUDES'])
  
    # Scan library outputs for files we need to link against this library, and
    # files we need to run executables linked against this library.
    need_for_link = []
    need_for_debug = []
    need_for_run = []
    for o in lib_outputs:
      if o.suffix in env['COMPONENT_LIBRARY_LINK_SUFFIXES']:
        need_for_link.append(o)
      if o.suffix in env['COMPONENT_LIBRARY_DEBUG_SUFFIXES']:
        need_for_debug.append(o)
      if o.suffix == env['SHLIBSUFFIX']:
        need_for_run.append(o)
    all_outputs = lib_outputs
  
    # Install library in intermediate directory, so other libs and programs can
    # link against it
    all_outputs += env.Replicate('$LIB_DIR', need_for_link)
  
    # Publish output
    env.Publish(lib_name, 'link', need_for_link)
    env.Publish(lib_name, 'run', need_for_run)
    env.Publish(lib_name, 'debug', need_for_debug)
  
    # Add an alias to build and copy the library, and add it to the right groups
    a = self.Alias(lib_name, all_outputs)
    for group in env['COMPONENT_LIBRARY_GROUPS']:
      SCons.Script.Alias(group, a)
  
    # Store list of components for this library
    env._StoreComponents(lib_name)
  
    # Let component_targets know this target is available in the current mode.
    env.SetTargetProperty(lib_name, TARGET_PATH=lib_outputs[0])
  
    # If library should publish itself, publish as if it was a program
    if env.get('COMPONENT_LIBRARY_PUBLISH'):
      env['PROGRAM_BASENAME'] = lib_name
      env.Defer(ComponentProgramDeferred)
  
    # Return the library
    return lib_outputs[0]
code_tokens: def ComponentLibrary ( self , lib_name , * args , ** kwargs ) : env = _ComponentPlatformSetup ( self , 'ComponentLibrary' , ** kwargs ) if env . get ( 'COMPONENT_STATIC' ) : lib_outputs = env . StaticLibrary ( lib_name , * args , ** kwargs ) else : lib_outputs = env . SharedLibrary ( lib_name , * args , ** kwargs ) env . Depends ( lib_outputs , env [ 'INCLUDES' ] ) need_for_link = [ ] need_for_debug = [ ] need_for_run = [ ] for o in lib_outputs : if o . suffix in env [ 'COMPONENT_LIBRARY_LINK_SUFFIXES' ] : need_for_link . append ( o ) if o . suffix in env [ 'COMPONENT_LIBRARY_DEBUG_SUFFIXES' ] : need_for_debug . append ( o ) if o . suffix == env [ 'SHLIBSUFFIX' ] : need_for_run . append ( o ) all_outputs = lib_outputs all_outputs += env . Replicate ( '$LIB_DIR' , need_for_link ) env . Publish ( lib_name , 'link' , need_for_link ) env . Publish ( lib_name , 'run' , need_for_run ) env . Publish ( lib_name , 'debug' , need_for_debug ) a = self . Alias ( lib_name , all_outputs ) for group in env [ 'COMPONENT_LIBRARY_GROUPS' ] : SCons . Script . Alias ( group , a ) env . _StoreComponents ( lib_name ) env . SetTargetProperty ( lib_name , TARGET_PATH = lib_outputs [ 0 ] ) if env . get ( 'COMPONENT_LIBRARY_PUBLISH' ) : env [ 'PROGRAM_BASENAME' ] = lib_name env . Defer ( ComponentProgramDeferred ) return lib_outputs [ 0 ]
short_docstring: Pseudo-builder for library to handle platform-dependent type.
short_docstring_tokens: Pseudo - builder for library to handle platform - dependent type .
comment: """Pseudo-builder for library to handle platform-dependent type.
  
    Args:
      self: Environment in which we were called.
      lib_name: Library name.
      args: Positional arguments.
      kwargs: Keyword arguments.
  
    Returns:
      Passthrough return code from env.StaticLibrary() or env.SharedLibrary().
    """$SEP$# Clone and modify environment$SEP$# Make appropriate library type$SEP$# Add dependencies on includes$SEP$# Scan library outputs for files we need to link against this library, and$SEP$# files we need to run executables linked against this library.$SEP$# Install library in intermediate directory, so other libs and programs can$SEP$# link against it$SEP$# Publish output$SEP$# Add an alias to build and copy the library, and add it to the right groups$SEP$# Store list of components for this library$SEP$# Let component_targets know this target is available in the current mode.$SEP$# If library should publish itself, publish as if it was a program$SEP$# Return the library