From 738149c9bfb9965d013d01ef99f9bb1c2819e7e8 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Tue, 15 Jun 2010 14:28:22 +0000 Subject: Imported Upstream version 2.0.0 --- doc/user/nodes.in | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'doc/user/nodes.in') diff --git a/doc/user/nodes.in b/doc/user/nodes.in index e583ea9..c65a2ad 100644 --- a/doc/user/nodes.in +++ b/doc/user/nodes.in @@ -332,6 +332,51 @@ +
+ &GetBuildPath;: Getting the Path From a &Node; or String + + + + env.GetBuildPath(file_or_list) + returns the path of a &Node; or a string representing a + path. It can also take a list of &Node;s and/or strings, and + returns the list of paths. If passed a single &Node;, the result + is the same as calling str(node) (see above). + The string(s) can have embedded construction variables, which are + expanded as usual, using the calling environment's set of + variables. The paths can be files or directories, and do not have + to exist. + + + + + + env=Environment(VAR="value") + n=File("foo.c") + print env.GetBuildPath([n, "sub/dir/$VAR"]) + + + + + + Would print the following file names: + + + + + scons -Q + + + + + There is also a function version of &GetBuildPath; which can + be called without an &Environment;; that uses the default SCons + &Environment; to do substitution on any string arguments. + + + +
+