summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-05-01 12:19:09 +0000
committerSteven Knight <knight@baldmt.com>2003-05-01 12:19:09 +0000
commit8adc0857c2ebd976314a29ca338d6ce82ece251f (patch)
tree8b3f5d2af4963ac489d69aa8f7c23ac431021762 /doc
parent3387eab42442c7fe7ed0064de5b939497cc6df1b (diff)
downloadscons-8adc0857c2ebd976314a29ca338d6ce82ece251f.tar.gz
Add Python Value Nodes. (Chad Austin)
Diffstat (limited to 'doc')
-rw-r--r--doc/man/scons.121
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1
index c96c8b80..14a2e501 100644
--- a/doc/man/scons.1
+++ b/doc/man/scons.1
@@ -4064,6 +4064,27 @@ env = Environment(tools = [ Tool('msvc') ])
.EE
.TP
+.RI Value( value )
+Returns a Node object representing the specified Python value. Value
+nodes can be used as dependencies of targets. If the result of
+calling
+.BR str( value )
+changes between SCons runs, any targets depending on
+.BR Value( value )
+will be rebuilt.
+
+.ES
+def create(target, source, env):
+ f = open(str(target[0]), 'wb')
+ f.write('prefix=' + source[0].get_contents())
+
+prefix = ARGUMENTS.get('prefix', '/usr/local')
+env = Environment()
+env['BUILDERS']['Config'] = Builder(action = create)
+env.Config(target = 'package-config', source = Value(prefix))
+.EE
+
+.TP
.RI WhereIs( program ", [" path ", [" pathext ]])
Searches for the specified executable