Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Buildhelper Namespace Reference

Classes

class  Record
 

Functions

def checkCommandOption
 
def createPlugins
 
def extract_localPathDefs
 
def filterNodes
 
def findSrcTrees
 
def getDirname
 
def globRootdirs
 
def isCleanupOperation
 
def isHelpRequest
 
def isSrcDir
 
def scanSubtree
 
def srcSubtree
 

Variables

list SRCPATTERNS
 

Function Documentation

def Buildhelper.isCleanupOperation (   env)

Definition at line 36 of file Buildhelper.py.

Referenced by Platform.configure().

+ Here is the caller graph for this function:

def Buildhelper.isHelpRequest ( )
this is a hack: SCons does all configure tests even if only
    the help message is requested. SCons doesn't export the
    help option for retrieval by env.GetOption(), 
    so we scan the commandline directly. 

Definition at line 39 of file Buildhelper.py.

Referenced by Platform.configure().

+ Here is the caller graph for this function:

def Buildhelper.srcSubtree (   tree,
  args 
)
convenience wrapper: scan the given subtree, which is relative
    to the current SConscript, and find all source files.

Definition at line 49 of file Buildhelper.py.

References scanSubtree().

Referenced by createPlugins().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def Buildhelper.scanSubtree (   roots,
  patterns = SRCPATTERNS 
)
first expand (possible) wildcards and filter out non-dirs. 
    Then scan the given subtree for source filenames 
    (python generator function)

Definition at line 59 of file Buildhelper.py.

References globRootdirs().

Referenced by srcSubtree().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def Buildhelper.globRootdirs (   roots)
helper: expand shell wildcards and filter the resulting list,
    so that it only contains existing directories

Definition at line 74 of file Buildhelper.py.

Referenced by findSrcTrees(), and scanSubtree().

+ Here is the caller graph for this function:

def Buildhelper.findSrcTrees (   location,
  patterns = SRCPATTERNS 
)
find possible source tree roots, starting with the given location.
    When delving down from the initial location(s), a source tree is defined
    as a directory containing source files and possibly further sub directories.
    After having initially expanded the given location with #globRootdirs, each
    directory is examined depth first, until encountering a directory containing
    source files, which then yields a result. Especially, this can be used to traverse
    an organisational directory structure and find out all possible source trees
    to be built into packages, plugins, individual tool executables etc.
    @return: the relative path names of all source root dirs found (generator function).

Definition at line 84 of file Buildhelper.py.

References globRootdirs().

Referenced by createPlugins().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def Buildhelper.isSrcDir (   path,
  patterns = SRCPATTERNS 
)
helper: investigate the given (relative) path
    @param patterns: list of wildcards to define what counts as "source file" 
    @return: True if it's a directory containing any source file

Definition at line 103 of file Buildhelper.py.

def Buildhelper.filterNodes (   nlist,
  removeName = None 
)
filter out scons build nodes using the given criteria.
    removeName: if set, remove all nodes with this srcname

Definition at line 117 of file Buildhelper.py.

def Buildhelper.getDirname (   d,
  basePrefix = None 
)
extract directory name without leading path,
    or without the explicitly given basePrefix

Definition at line 130 of file Buildhelper.py.

Referenced by createPlugins(), and LumieraEnvironment.register_LumieraResourceBuilder().

+ Here is the caller graph for this function:

def Buildhelper.createPlugins (   env,
  directory,
  kw 
)
investigate the given source directory to identify all contained source trees.
    @return: a list of build nodes defining a plugin for each of these source trees.

Definition at line 148 of file Buildhelper.py.

References findSrcTrees(), getDirname(), and srcSubtree().

+ Here is the call graph for this function:

def Buildhelper.checkCommandOption (   env,
  optID,
  val = None,
  cmdName = None 
)
evaluate and verify an option, which may point at a command.
    besides specifying a path, the option may read True, yes or 1,
    denoting that the system default for this command should be used.
    @return: True, if the key has been expanded and validated,
             False, if this failed and the key was removed

Definition at line 161 of file Buildhelper.py.

Referenced by ToolDistCC.exists(), and ToolCCache.exists().

+ Here is the caller graph for this function:

def Buildhelper.extract_localPathDefs (   localDefs)
extracts the directory configuration values.
    For sake of simplicity, paths and directories are defined
    immediately as global variables in the SConstruct. This helper
    extracts from the given dict the variables matching some magical
    pattern and returns them wrapped into a Record for convenient access

Definition at line 218 of file Buildhelper.py.

Variable Documentation

list SRCPATTERNS

Definition at line 57 of file Buildhelper.py.