![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Classes | |
| class | Record |
| a set of properties with record style access. More... | |
Functions | |
| isCleanupOperation (env) | |
| isHelpRequest () | |
| this is a hack: SCons does all configure tests even if only the help message is requested. | |
| srcSubtree (tree, **args) | |
| convenience wrapper: scan the given subtree, which is relative to the current SConscript, and find all source files. | |
| scanSubtree (roots, patterns=SRCPATTERNS) | |
| first expand (possible) wildcards and filter out non-dirs. | |
| globRootdirs (roots) | |
| helper: expand shell wildcards and filter the resulting list, so that it only contains existing directories | |
| findSrcTrees (location, patterns=SRCPATTERNS) | |
| find possible source tree roots, starting with the given location. | |
| isSrcDir (path, patterns=SRCPATTERNS) | |
| helper: investigate the given (relative) path | |
| getDirname (d, basePrefix=None) | |
| extract directory name without leading path, or without the explicitly given basePrefix | |
| stripPrefix (path, prefix) | |
| createPlugins (env, directory, **kw) | |
| investigate the given source directory to identify all contained source trees. | |
| checkCommandOption (env, optID, val=None, cmdName=None) | |
| evaluate and verify an option, which may point at a command. | |
| extract_localPathDefs (localDefs) | |
| extracts the directory configuration values. | |
Variables | |
| list | SRCPATTERNS = ['*.c','*.cpp','*.cc'] |
| isCleanupOperation | ( | env | ) |
Definition at line 27 of file Buildhelper.py.
| 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 30 of file Buildhelper.py.
| srcSubtree | ( | tree, | |
| ** | args | ||
| ) |
convenience wrapper: scan the given subtree, which is relative to the current SConscript, and find all source files.
Definition at line 40 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:| 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 50 of file Buildhelper.py.
References globRootdirs(), and stripPrefix().
Referenced by srcSubtree().
Here is the call graph for this function:
Here is the caller graph for this function:| globRootdirs | ( | roots | ) |
helper: expand shell wildcards and filter the resulting list, so that it only contains existing directories
Definition at line 64 of file Buildhelper.py.
Referenced by findSrcTrees(), and scanSubtree().
Here is the caller graph for this function:| 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.
Definition at line 74 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:| isSrcDir | ( | path, | |
patterns = SRCPATTERNS |
|||
| ) |
helper: investigate the given (relative) path
| patterns | list of wildcards to define what counts as "source file" |
Definition at line 93 of file Buildhelper.py.
| getDirname | ( | d, | |
basePrefix = None |
|||
| ) |
extract directory name without leading path, or without the explicitly given basePrefix
Definition at line 107 of file Buildhelper.py.
References stripPrefix().
Referenced by createPlugins(), LumieraEnvironment.register_LumieraIconBuilder(), and LumieraEnvironment.register_LumieraResourceBuilders().
Here is the call graph for this function:
Here is the caller graph for this function:| stripPrefix | ( | path, | |
| prefix | |||
| ) |
Definition at line 123 of file Buildhelper.py.
Referenced by getDirname(), and scanSubtree().
Here is the caller graph for this function:| createPlugins | ( | env, | |
| directory, | |||
| ** | kw | ||
| ) |
investigate the given source directory to identify all contained source trees.
Definition at line 130 of file Buildhelper.py.
References findSrcTrees(), getDirname(), and srcSubtree().
Here is the call graph for this function:| 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.
Definition at line 143 of file Buildhelper.py.
Referenced by ToolCCache.exists(), and ToolDistCC.exists().
Here is the caller graph for this function:| 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 200 of file Buildhelper.py.
| list SRCPATTERNS = ['*.c','*.cpp','*.cc'] |
Definition at line 48 of file Buildhelper.py.