summaryrefslogtreecommitdiff
path: root/doc/user
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user')
-rw-r--r--doc/user/build-install.xml2
-rw-r--r--doc/user/output.xml22
-rw-r--r--doc/user/sconf.xml20
-rw-r--r--doc/user/tasks.xml4
-rw-r--r--doc/user/titlepage/SConsBuildBricks_path.svg22
5 files changed, 55 insertions, 15 deletions
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
<para>
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,
<para>
+ Optionally, one can specify the append flag:
+
+ </para>
+
+ <scons_example name="output_ex1_a">
+ <file name="SConstruct" printme="1">
+Help("""
+Type: 'scons program' to build the production program,
+ 'scons debug' to build the debug version.
+""", append=True)
+ </file>
+ </scons_example>
+
+ <para>
+
(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,
<para>
+ 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.
+
+ </para>
+
+ <para>
+
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
@@ -304,6 +304,26 @@ scons: `.' is up to date.
</section>
<section>
+ <title>Checking for the Presence of a program</title>
+
+ <para>
+
+ Check for the presence of a program
+ by using the &CheckProg; method:
+
+ </para>
+
+ <sconstruct>
+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()
+ </sconstruct>
+
+ </section>
+ <section>
<title>Adding Your Own Custom Checks</title>
<para>
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]
<example>
<title>The "backtick function": run a shell command and capture the
output</title>
-<programlisting>import os
-output = os.popen(command).read()
+<programlisting>import subprocess
+output = subprocess.check_output(command)
</programlisting>
</example>
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 @@
</cc:Agent>
</dc:contributor>
<cc:license
- rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/" />
+ rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</cc:Work>
<cc:License
- rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/">
+ rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<cc:permits
- rdf:resource="http://web.resource.org/cc/Reproduction" />
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
- rdf:resource="http://web.resource.org/cc/Distribution" />
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
- rdf:resource="http://web.resource.org/cc/Notice" />
+ rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
- rdf:resource="http://web.resource.org/cc/Attribution" />
- <cc:prohibits
- rdf:resource="http://web.resource.org/cc/CommercialUse" />
+ rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
- rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
- rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>