summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2012-03-03 09:05:51 -0500
committerGary Oberbrunner <garyo@oberbrunner.com>2012-03-03 09:05:51 -0500
commit2d1f7094e23a761b3e7afb0b61ef42afcc0a093e (patch)
treeaf2b81b08130a0ca1645914cd231ed9e7d6b7ab4
parent29fdccbaa810aea35d1190224ab404104a07ca7a (diff)
parent6cc3e72bad6d45970c13d9ffd6bba23c14bcd0df (diff)
downloadscons-2d1f7094e23a761b3e7afb0b61ef42afcc0a093e.tar.gz
Merged in managan/latex_multibib/latex_mbib (pull request #12)
-rw-r--r--doc/user/command-line.in28
-rw-r--r--doc/user/command-line.xml28
2 files changed, 46 insertions, 10 deletions
diff --git a/doc/user/command-line.in b/doc/user/command-line.in
index abf8953c..42f8e2e8 100644
--- a/doc/user/command-line.in
+++ b/doc/user/command-line.in
@@ -885,7 +885,7 @@
<scons_example name="Variables1">
<file name="SConstruct" printme="1">
- vars = Variables()
+ vars = Variables(None, ARGUMENTS)
vars.Add('RELEASE', 'Set to 1 to build for release', 0)
env = Environment(variables = vars,
CPPDEFINES={'RELEASE_BUILD' : '${RELEASE}'})
@@ -902,8 +902,9 @@
<para>
This &SConstruct; file first creates a &Variables; object
- (the <literal>vars = Variables()</literal> call),
- and then uses the object's &Add;
+ which uses the values from the command-line options dictionary &ARGUMENTS;
+ (the <literal>vars = Variables(None, ARGUMENTS)</literal> call).
+ It then uses the object's &Add;
method to indicate that the &RELEASE;
variable can be set on the command line,
and that its default value will be <literal>0</literal>
@@ -942,7 +943,7 @@
&PathOption;, &PackageOption; and &AddOptions;.
These older names still work,
and you may encounter them in older
- &SConscript; fles,
+ &SConscript; files,
but they have been officially deprecated
as of &SCons; version 2.0.
@@ -975,7 +976,7 @@
<scons_example name="Variables_Help">
<file name="SConstruct" printme="1">
- vars = Variables('custom.py')
+ vars = Variables(None, ARGUMENTS)
vars.Add('RELEASE', 'Set to 1 to build for release', 0)
env = Environment(variables = vars)
Help(vars.GenerateHelpText(env))
@@ -1098,6 +1099,23 @@
<scons_output_command>scons -Q</scons_output_command>
</scons_output>
+ <para>
+
+ Finally, you can combine both methods with:
+
+ </para>
+
+ <screen>
+ vars = Variables('custom.py', ARGUMENTS)
+ </screen>
+
+ <para>
+
+ where values in the option file &custom_py; get overwritten
+ by the ones specified on the command line.
+
+ </para>
+
</section>
<section>
diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml
index 1bb84e26..49edf8ac 100644
--- a/doc/user/command-line.xml
+++ b/doc/user/command-line.xml
@@ -875,7 +875,7 @@
</para>
<programlisting>
- vars = Variables()
+ vars = Variables(None, ARGUMENTS)
vars.Add('RELEASE', 'Set to 1 to build for release', 0)
env = Environment(variables = vars,
CPPDEFINES={'RELEASE_BUILD' : '${RELEASE}'})
@@ -885,8 +885,9 @@
<para>
This &SConstruct; file first creates a &Variables; object
- (the <literal>vars = Variables()</literal> call),
- and then uses the object's &Add;
+ which uses the values from the command-line options dictionary &ARGUMENTS;
+ (the <literal>vars = Variables(None, ARGUMENTS)</literal> call).
+ It then uses the object's &Add;
method to indicate that the &RELEASE;
variable can be set on the command line,
and that its default value will be <literal>0</literal>
@@ -928,7 +929,7 @@
&PathOption;, &PackageOption; and &AddOptions;.
These older names still work,
and you may encounter them in older
- &SConscript; fles,
+ &SConscript; files,
but they have been officially deprecated
as of &SCons; version 2.0.
@@ -960,7 +961,7 @@
</para>
<programlisting>
- vars = Variables('custom.py')
+ vars = Variables(None, ARGUMENTS)
vars.Add('RELEASE', 'Set to 1 to build for release', 0)
env = Environment(variables = vars)
Help(vars.GenerateHelpText(env))
@@ -1069,6 +1070,23 @@
cc -o foo foo.o bar.o
</screen>
+ <para>
+
+ Finally, you can combine both methods with:
+
+ </para>
+
+ <screen>
+ vars = Variables('custom.py', ARGUMENTS)
+ </screen>
+
+ <para>
+
+ where values in the option file &custom_py; get overwritten
+ by the ones specified on the command line.
+
+ </para>
+
</section>
<section>