diff options
Diffstat (limited to 'doc/user/parseflags.xml')
-rw-r--r-- | doc/user/parseflags.xml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/user/parseflags.xml b/doc/user/parseflags.xml index 26313ce..cc31b3b 100644 --- a/doc/user/parseflags.xml +++ b/doc/user/parseflags.xml @@ -80,11 +80,12 @@ <scons_example name="parseflags_ex1"> <file name="SConstruct" printme="1"> +from __future__ import print_function env = Environment() d = env.ParseFlags("-I/opt/include -L/opt/lib -lfoo") for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') </file> @@ -119,11 +120,12 @@ int main() { return 0; } <scons_example name="parseflags_ex2"> <file name="SConstruct" printme="1"> +from __future__ import print_function env = Environment() d = env.ParseFlags("-whatever") for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') </file> @@ -145,11 +147,12 @@ env.Program('f1.c') <scons_example name="parseflags_ex3"> <file name="SConstruct" printme="1"> +from __future__ import print_function env = Environment() d = env.ParseFlags(["-I/opt/include", ["-L/opt/lib", "-lfoo"]]) for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') </file> @@ -172,11 +175,12 @@ int main() { return 0; } <scons_example name="parseflags_ex4"> <file name="SConstruct" printme="1"> +from __future__ import print_function env = Environment() d = env.ParseFlags(["!echo -I/opt/include", "!echo -L/opt/lib", "-lfoo"]) for k,v in sorted(d.items()): if v: - print k, v + print(k, v) env.MergeFlags(d) env.Program('f1.c') </file> |