diff options
author | anatoly techtonik <techtonik@gmail.com> | 2014-02-27 11:41:34 (GMT) |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2014-02-27 11:41:34 (GMT) |
commit | a4bf97139623a8b838a11c6ca6e973a45d1da7f7 (patch) | |
tree | 64346d44fee50ca49fb00a6bb66da3deeb23dbdd | |
parent | cb44210566c28d16c1e2c91d898306ad539fa9f5 (diff) | |
download | SCons-a4bf97139623a8b838a11c6ca6e973a45d1da7f7.zip SCons-a4bf97139623a8b838a11c6ca6e973a45d1da7f7.tar.gz SCons-a4bf97139623a8b838a11c6ca6e973a45d1da7f7.tar.bz2 |
Update textfile.Substfile documentation
-rw-r--r-- | src/engine/SCons/Tool/textfile.xml | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/engine/SCons/Tool/textfile.xml b/src/engine/SCons/Tool/textfile.xml index c5e586b..428a318 100644 --- a/src/engine/SCons/Tool/textfile.xml +++ b/src/engine/SCons/Tool/textfile.xml @@ -110,11 +110,10 @@ blob.txt <builder name="Substfile"> <summary> <para> -The &b-Substfile; builder generates a single text file -by concatenating the source files. -Nested lists of sources are flattened. -&cv-LINESEPARATOR; is used to separate the source files; -see the description of &b-Textfile; for details. +The &b-Substfile; builder creates text file from another file or set of +files by concatenating them with &cv-LINESEPARATOR; and replacing text +using &cv-SUBST_DICT; construction variable. Nested lists of source files +are flattened. See also &b-Textfile;. </para> <para> @@ -132,20 +131,19 @@ are automatically added to the target if they are not already present. <para> If a construction variable named &cv-SUBST_DICT; is present, it may be either a Python dictionary or a sequence of (key,value) tuples. -If the former, -the dictionary is converted into a list of tuples in an arbitrary order, +If it is dictionary, +it is converted into a list of tuples in an arbitrary order, so if one key is a prefix of another key or if one substitution could be further expanded by another subsitition, it is unpredictible whether the expansion will occur. </para> <para> -Any occurences in the source of a key +Any occurences of a key in the source are replaced by the corresponding value, which may be a Python callable function or a string. -If a value is a function, -it is first called (with no arguments) to produce a string. -The string is <emphasis>subst</emphasis>-expanded +A function is called with no arguments to get a string. +Strings are <emphasis>subst</emphasis>-expanded and the result replaces the key. </para> |