From b0974fc65865beb6462bb62cfada3a1a0c4ed46f Mon Sep 17 00:00:00 2001 From: stevenknight Date: Mon, 21 Apr 2008 06:38:31 +0000 Subject: [PATCH] Merged revisions 2880-2883,2885-2895 via svnmerge from http://scons.tigris.org/svn/scons/branches/core ........ r2885 | stevenknight | 2008-04-18 21:38:59 -0700 (Fri, 18 Apr 2008) | 2 lines Update troubleshooting appendix for new Taskmaster output. ........ r2886 | bdbaddog | 2008-04-19 15:15:03 -0700 (Sat, 19 Apr 2008) | 5 lines Fix infinite loop in Fortran tool initialization. Bug 2017. Steven fixed, I tested. ........ r2887 | garyo | 2008-04-20 17:44:46 -0700 (Sun, 20 Apr 2008) | 1 line Added this in two sections; simple one when discussing simple builds, and an example in the VariantDir section showing how it still works there. ........ r2888 | stevenknight | 2008-04-20 21:33:01 -0700 (Sun, 20 Apr 2008) | 4 lines Accomodate test/MSVC/msvc.py's reliance on the Windows Platform SDK (for now) by making use of the user's %INCLUDE% and %LIB% variables. Split some independent embedded subtests into their own test scripts. ........ r2889 | stevenknight | 2008-04-20 21:38:05 -0700 (Sun, 20 Apr 2008) | 2 lines Windows portability fix (line endings). ........ r2890 | stevenknight | 2008-04-20 21:44:24 -0700 (Sun, 20 Apr 2008) | 2 lines Update Windows portion of if:-elif: block for a variable name change. ........ r2891 | stevenknight | 2008-04-20 21:52:41 -0700 (Sun, 20 Apr 2008) | 3 lines On Windows, escape backslashes on the --interactive command line input, so people can build targets in other directories. ........ r2892 | stevenknight | 2008-04-20 21:56:50 -0700 (Sun, 20 Apr 2008) | 3 lines Fix ripple effects on Windows from redefining how $CXXFLAGS gets added to C++ command lines. ........ r2893 | stevenknight | 2008-04-20 22:04:50 -0700 (Sun, 20 Apr 2008) | 4 lines Handle a ripple effect from redefining the file() and open() builtin functions by explicitly restoring the originals whenever we reset the global state between tests. ........ r2894 | stevenknight | 2008-04-20 23:17:23 -0700 (Sun, 20 Apr 2008) | 2 lines Remove by-hand backslash escaping, now that --interactive mode is handling it. ........ r2895 | stevenknight | 2008-04-20 23:23:04 -0700 (Sun, 20 Apr 2008) | 2 lines Mention the fix for the Fortran suffix out-of-memory bug ........ git-svn-id: http://scons.tigris.org/svn/scons/trunk@2896 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- doc/user/less-simple.in | 24 +++++++ doc/user/less-simple.xml | 24 +++++++ doc/user/separate.in | 57 ++++++++++++++++ doc/user/separate.xml | 46 +++++++++++++ doc/user/troubleshoot.xml | 50 ++++++++------ src/CHANGES.txt | 12 ++++ src/engine/SCons/ActionTests.py | 3 +- src/engine/SCons/SConfTests.py | 16 ++++- src/engine/SCons/Script/Interactive.py | 2 + src/engine/SCons/Tool/FortranCommon.py | 7 +- test/CXX/CCFLAGS.py | 6 +- test/Deprecated/Options/ListOption.py | 4 +- test/Interactive/added-include.py | 7 +- test/MSVC/PCHSTOP-errors.py | 75 ++++++++++++++++++++ test/MSVC/hierarchical.py | 93 +++++++++++++++++++++++++ test/MSVC/msvc.py | 95 ++------------------------ test/NodeOps.py | 19 ++---- test/gnutools.py | 4 +- 18 files changed, 405 insertions(+), 139 deletions(-) create mode 100644 test/MSVC/PCHSTOP-errors.py create mode 100644 test/MSVC/hierarchical.py diff --git a/doc/user/less-simple.in b/doc/user/less-simple.in index 76afa302..7b452718 100644 --- a/doc/user/less-simple.in +++ b/doc/user/less-simple.in @@ -208,6 +208,30 @@ +
+ Making a list of files with Glob() + + + + You can also use the Glob() function to find all files matching a + certain template, using standard the shell pattern matching + characters *, ?, and [abc] to match any of a, b, or c. [!abc] is + also supported, to match any character except + a, b, or c. This makes many multi-source-file builds quite easy: + + + + + Program('program', Glob('*.c')) + + + + + The SCons man page has more details on using Glob() with Variant + dirs and Repositories and returning strings rather than Nodes. + +
+
Specifying Single Files Vs. Lists of Files diff --git a/doc/user/less-simple.xml b/doc/user/less-simple.xml index eea34251..c6ded707 100644 --- a/doc/user/less-simple.xml +++ b/doc/user/less-simple.xml @@ -197,6 +197,30 @@
+
+ Making a list of files with Glob() + + + + You can also use the Glob() function to find all files matching a + certain template, using standard the shell pattern matching + characters *, ?, and [abc] to match any of a, b, or c. [!abc] is + also supported, to match any character except + a, b, or c. This makes many multi-source-file builds quite easy: + + + + + Program('program', Glob('*.c')) + + + + + The SCons man page has more details on using Glob() with Variant + dirs and Repositories and returning strings rather than Nodes. + +
+
Specifying Single Files Vs. Lists of Files diff --git a/doc/user/separate.in b/doc/user/separate.in index be7e6c5d..dc77af3a 100644 --- a/doc/user/separate.in +++ b/doc/user/separate.in @@ -466,6 +466,63 @@ program using the F path name.
+
+ Using Glob() with &VariantDir; + + + + The Glob() file name pattern matching function + works just as usual when using &VariantDir;. + For example, if the + src/SConscript + looks like this: + + + + + + VariantDir('build', 'src') + SConscript('build/SConscript') + + + env = Environment() + env.Program('hello', Glob('*.c')) + + + #include "f2.h" + int main() { printf(f2()); } + + + const char * f2() { return("Hello, world!\n"); } + + + const char * f2(); + + + + + + Then with the same &SConstruct; file as in the previous section, + and source files f1.c and f2.c in src, we would see the following + output: + + + + + ls src + scons -Q + ls build + + + + + The Glob function returns Nodes in the build/ tree, as + you'd expect. + + + +
+