From e20c9557371eacec533588d33b4bebd543ba178f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 16 Nov 2015 06:58:13 +0100 Subject: Imported Upstream version 2.4.1 --- doc/user/build-install.xml | 2 +- doc/user/output.xml | 22 ++++++++++++++++++++++ doc/user/sconf.xml | 20 ++++++++++++++++++++ doc/user/tasks.xml | 4 ++-- doc/user/titlepage/SConsBuildBricks_path.svg | 22 ++++++++++------------ 5 files changed, 55 insertions(+), 15 deletions(-) (limited to 'doc/user') diff --git a/doc/user/build-install.xml b/doc/user/build-install.xml index 553be4b..15c0a84 100644 --- a/doc/user/build-install.xml +++ b/doc/user/build-install.xml @@ -231,7 +231,7 @@ Python 2.5.1 Or, you can use a graphical RPM package manager. - See your package manager application's documention + See your package manager application's documentation for specific instructions about how to use it to install a downloaded RPM. diff --git a/doc/user/output.xml b/doc/user/output.xml index 3af96b4..5230e5c 100644 --- a/doc/user/output.xml +++ b/doc/user/output.xml @@ -83,6 +83,21 @@ Type: 'scons program' to build the production program, + Optionally, one can specify the append flag: + + + + + +Help(""" +Type: 'scons program' to build the production program, + 'scons debug' to build the debug version. +""", append=True) + + + + + (Note the above use of the Python triple-quote syntax, which comes in very handy for specifying multi-line strings like help text.) @@ -120,6 +135,13 @@ Type: 'scons program' to build the production program, + When used with &AddOption; Help("text", append=False) will clobber any help output associated with AddOption(). + To preserve the help output from AddOption(), set append=True. + + + + + Another use would be to make the help text conditional on some variable. For example, suppose you only want to display diff --git a/doc/user/sconf.xml b/doc/user/sconf.xml index 9096aad..621405e 100644 --- a/doc/user/sconf.xml +++ b/doc/user/sconf.xml @@ -303,6 +303,26 @@ scons: `.' is up to date. +
+ Checking for the Presence of a program + + + + Check for the presence of a program + by using the &CheckProg; method: + + + + +env = Environment() +conf = Configure(env) +if not conf.CheckProg('foobar'): + print 'Unable to find the program foobar on the system' + Exit(1) +env = conf.Finish() + + +
Adding Your Own Custom Checks diff --git a/doc/user/tasks.xml b/doc/user/tasks.xml index e5ab216..e06c64a 100644 --- a/doc/user/tasks.xml +++ b/doc/user/tasks.xml @@ -96,8 +96,8 @@ filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions] The "backtick function": run a shell command and capture the output -import os -output = os.popen(command).read() +import subprocess +output = subprocess.check_output(command) diff --git a/doc/user/titlepage/SConsBuildBricks_path.svg b/doc/user/titlepage/SConsBuildBricks_path.svg index ed0c60d..0d7f63e 100644 --- a/doc/user/titlepage/SConsBuildBricks_path.svg +++ b/doc/user/titlepage/SConsBuildBricks_path.svg @@ -14,9 +14,9 @@ height="80.330002" id="svg2" sodipodi:version="0.32" - inkscape:version="0.48.1 r9760" + inkscape:version="0.48.4 r9939" version="1.0" - sodipodi:docname="SConsBuildBricks.svg" + sodipodi:docname="SConsBuildBricks_path.svg" inkscape:export-filename="Constructs-using-SCons.png" inkscape:export-xdpi="100" inkscape:export-ydpi="100"> @@ -77,24 +77,22 @@ + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"> + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + rdf:resource="http://creativecommons.org/ns#Distribution" /> + rdf:resource="http://creativecommons.org/ns#Notice" /> - + rdf:resource="http://creativecommons.org/ns#Attribution" /> + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> -- cgit v1.2.3