summaryrefslogtreecommitdiffstats
path: root/doc/user
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user')
-rw-r--r--doc/user/add-method.in2
-rw-r--r--doc/user/add-method.xml2
-rw-r--r--doc/user/builders-writing.in6
-rw-r--r--doc/user/builders-writing.xml6
-rw-r--r--doc/user/command-line.in30
-rw-r--r--doc/user/command-line.xml30
-rw-r--r--doc/user/depends.in6
-rw-r--r--doc/user/depends.xml6
-rw-r--r--doc/user/environments.in4
-rw-r--r--doc/user/environments.xml4
10 files changed, 66 insertions, 30 deletions
diff --git a/doc/user/add-method.in b/doc/user/add-method.in
index 7efd923..2deb07a 100644
--- a/doc/user/add-method.in
+++ b/doc/user/add-method.in
@@ -65,7 +65,7 @@
<para>
- As mentioned, a psuedo-builder also provides more flexibility
+ As mentioned, a pseudo-builder also provides more flexibility
in parsing arguments than you can get with a &Builder;.
The next example shows a pseudo-builder with a
named argument that modifies the filename, and a separate argument
diff --git a/doc/user/add-method.xml b/doc/user/add-method.xml
index 51bc04b..3aac7a8 100644
--- a/doc/user/add-method.xml
+++ b/doc/user/add-method.xml
@@ -64,7 +64,7 @@
<para>
- As mentioned, a psuedo-builder also provides more flexibility
+ As mentioned, a pseudo-builder also provides more flexibility
in parsing arguments than you can get with a &Builder;.
The next example shows a pseudo-builder with a
named argument that modifies the filename, and a separate argument
diff --git a/doc/user/builders-writing.in b/doc/user/builders-writing.in
index 93a183c..749a8ba 100644
--- a/doc/user/builders-writing.in
+++ b/doc/user/builders-writing.in
@@ -98,8 +98,8 @@ This functionality could be invoked as in the following example:
<para>
Although &SCons; provides many useful methods
- for building common software products:
- programs, libraries, documents.
+ for building common software products
+ (programs, libraries, documents, etc.),
you frequently want to be
able to build some other type of file
not supported directly by &SCons;.
@@ -109,7 +109,7 @@ This functionality could be invoked as in the following example:
(In fact, the &SCons; interfaces for creating
&Builder; objects are flexible enough and easy enough to use
that all of the the &SCons; built-in &Builder; objects
- are created the mechanisms described in this section.)
+ are created using the mechanisms described in this section.)
</para>
diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml
index c8ff003..f42a61f 100644
--- a/doc/user/builders-writing.xml
+++ b/doc/user/builders-writing.xml
@@ -98,8 +98,8 @@ This functionality could be invoked as in the following example:
<para>
Although &SCons; provides many useful methods
- for building common software products:
- programs, libraries, documents.
+ for building common software products
+ (programs, libraries, documents, etc.),
you frequently want to be
able to build some other type of file
not supported directly by &SCons;.
@@ -109,7 +109,7 @@ This functionality could be invoked as in the following example:
(In fact, the &SCons; interfaces for creating
&Builder; objects are flexible enough and easy enough to use
that all of the the &SCons; built-in &Builder; objects
- are created the mechanisms described in this section.)
+ are created using the mechanisms described in this section.)
</para>
diff --git a/doc/user/command-line.in b/doc/user/command-line.in
index abf8953..33f88ec 100644
--- a/doc/user/command-line.in
+++ b/doc/user/command-line.in
@@ -62,7 +62,7 @@
Any command-line argument containing an <literal>=</literal>
(equal sign) is considered a variable setting with the form
- <varname>variable</varname>=<varname>value</varname>
+ <varname>variable</varname>=<varname>value</varname>.
&SCons; provides direct access to
all of the command-line variable settings,
the ability to apply command-line variable settings
@@ -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 1bb84e2..1006c6b 100644
--- a/doc/user/command-line.xml
+++ b/doc/user/command-line.xml
@@ -62,7 +62,7 @@
Any command-line argument containing an <literal>=</literal>
(equal sign) is considered a variable setting with the form
- <varname>variable</varname>=<varname>value</varname>
+ <varname>variable</varname>=<varname>value</varname>.
&SCons; provides direct access to
all of the command-line variable settings,
the ability to apply command-line variable settings
@@ -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>
diff --git a/doc/user/depends.in b/doc/user/depends.in
index 88828fe..f601312 100644
--- a/doc/user/depends.in
+++ b/doc/user/depends.in
@@ -593,11 +593,11 @@
<para>
- Another thing to look out for, is the fact that the three
+ Another thing to look out for is the fact that the three
attributes above may not be present at the time of the first run.
- Without any prior build, no targets got created and no
+ Without any prior build, no targets have been created and no
<filename>.sconsign</filename> DB file exists yet.
- So, it is recommended to always check whether the
+ So, you should always check whether the
<varname>prev_ni</varname> attribute in question is available.
</para>
diff --git a/doc/user/depends.xml b/doc/user/depends.xml
index a5e84d6..df2a911 100644
--- a/doc/user/depends.xml
+++ b/doc/user/depends.xml
@@ -589,11 +589,11 @@
<para>
- Another thing to look out for, is the fact that the three
+ Another thing to look out for is the fact that the three
attributes above may not be present at the time of the first run.
- Without any prior build, no targets got created and no
+ Without any prior build, no targets have been created and no
<filename>.sconsign</filename> DB file exists yet.
- So, it is recommended to always check whether the
+ So, you should always check whether the
<varname>prev_ni</varname> attribute in question is available.
</para>
diff --git a/doc/user/environments.in b/doc/user/environments.in
index f767676..9f39347 100644
--- a/doc/user/environments.in
+++ b/doc/user/environments.in
@@ -684,7 +684,7 @@ environment, of directory names, suffixes, etc.
<para>
Another way to get information from
- a construction environment.
+ a construction environment
is to use the &subst; method
on a string containing <literal>$</literal> expansions
of construction variable names.
@@ -874,7 +874,7 @@ environment, of directory names, suffixes, etc.
<para>
You can, however, control the settings
- in the default contstruction environment
+ in the default construction environment
by using the &DefaultEnvironment; function
to initialize various settings:
diff --git a/doc/user/environments.xml b/doc/user/environments.xml
index b2a8505..eaf4ba3 100644
--- a/doc/user/environments.xml
+++ b/doc/user/environments.xml
@@ -684,7 +684,7 @@ environment, of directory names, suffixes, etc.
<para>
Another way to get information from
- a construction environment.
+ a construction environment
is to use the &subst; method
on a string containing <literal>$</literal> expansions
of construction variable names.
@@ -875,7 +875,7 @@ environment, of directory names, suffixes, etc.
<para>
You can, however, control the settings
- in the default contstruction environment
+ in the default construction environment
by using the &DefaultEnvironment; function
to initialize various settings: