- AbsDirNode(path)¶
- env.AbsDirNode(path)¶
Creates a node that are outside the current parts file directory. By default SCons does not like referring to directories outside the current directory tree that contains the SConscript, SConstruct or Parts file. Part of the reason is how SCons deals with variant directories. This function allow for referring to these files by mapping the node correctly to one of two specially made variant directories. One of these directories is for directories under the current SConstruct directory but outside the directory of the defining Parts file referred to via the $ROOT_BUILD_DIR variable. The other is for directories out the the current SConstruct directory tree, referred to via the $OUTOFTREE_BUILD_DIR variable.
- Parameters:
path (str) – path to directory
- Returns:
SCons directory node to the directory
Examples¶
Add directory to path that is outside the current tree
env.Append(CPPPATH= [env.AbsDirNode('../include')])
- AbsDir(path)¶
- env.AbsDir(path)¶
This is the same as
AbsDirNode()
, except it returns a string. Prefer to callingAbsDirNode()
this function. However there are cases in which the path to the source file may be needed as a string.It is equivalent to calling
AbsDirNode("../some/path").srcnode().abspath