diff options
author | Greg Noel <GregNoel@tigris.org> | 2009-04-22 21:50:58 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2009-04-22 21:50:58 (GMT) |
commit | 05a824904daa8e3b04bd0222c198d70b9240f73e (patch) | |
tree | 210de2617becc7f0f74ff7b163e2a8cc0fd78796 /src | |
parent | 1a873e1d317bd86b955934eb23161b6917c117e4 (diff) | |
download | SCons-05a824904daa8e3b04bd0222c198d70b9240f73e.zip SCons-05a824904daa8e3b04bd0222c198d70b9240f73e.tar.gz SCons-05a824904daa8e3b04bd0222c198d70b9240f73e.tar.bz2 |
Editing changes for textfile.xml and credit to Hartmut Goebel
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 6 | ||||
-rw-r--r-- | src/engine/SCons/Tool/textfile.xml | 21 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 94405dd..846a57b 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -17,6 +17,10 @@ RELEASE X.X.X - XXX - An option name and aliases can now be specified as a tuple. + From Hartmut Goebel: + + - Textfile builder. + From Jim Hunziker: - Avoid adding -gphobos to a command line multiple times @@ -50,7 +54,7 @@ RELEASE X.X.X - XXX - Restructure a test that occasionally hung so that the test would detect when it was stuck and fail instead. - - Add the Textfile and Substfile builders. + - Substfile builder. From Gary Oberbrunner: diff --git a/src/engine/SCons/Tool/textfile.xml b/src/engine/SCons/Tool/textfile.xml index d1026ec..54e801c 100644 --- a/src/engine/SCons/Tool/textfile.xml +++ b/src/engine/SCons/Tool/textfile.xml @@ -36,6 +36,7 @@ and &cv-TEXTFILESUFFIX; construction variables (the null string and <filename>.txt</filename> by default, respectively) are automatically added to the target if they are not already present. Examples: + <example> # builds/writes foo.txt env.Textfile(target = 'foo.txt', source = ['Goethe', 42, 'Schiller']) @@ -56,25 +57,25 @@ env.Textfile(target = 'concat', # concatenate files with a marker between Results are: foo.txt - ....8<---- + ....8<---- Goethe 42 Schiller - ....8<---- (no linefeed at the end) + ....8<---- (no linefeed at the end) bar.txt: - ....8<---- + ....8<---- lalala|*tanteratei - ....8<---- (no linefeed at the end) + ....8<---- (no linefeed at the end) -blog.txt - ....8<---- +blob.txt + ....8<---- lalala Goethe 42 Schiller tanteratei - ....8<---- (no linefeed at the end) + ....8<---- (no linefeed at the end) </example> </summary> </builder> @@ -108,7 +109,8 @@ 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 &subst;-expanded and the result is substituted. +The string is <emphasis>subst</emphasis>-expanded +and the result replaces the key. <example> env = Environment(tools = ['default', 'textfile']) @@ -125,7 +127,7 @@ bad_foo = {'$foo': '$foo', '$foobar': '$foobar'} env.Substfile('foo.in', SUBST_DICT = bad_foo) # PREDICTABLE - keys are applied longest first -good_foo = ['$foobar': '$foobar', '$foo': '$foo'] +good_foo = [('$foobar', '$foobar'), ('$foo', '$foo')] env.Substfile('foo.in', SUBST_DICT = good_foo) # UNPREDICTABLE - one substitution could be futher expanded @@ -185,7 +187,6 @@ the null string by default. <summary> The suffix used for &b-Substfile; file names, the null string by default. -</example> </summary> </cvar> |