From: stevenknight Date: Wed, 25 Jun 2003 18:30:34 +0000 (+0000) Subject: Branch for User's Guide changes. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f99f098c4475e2c4eca8f4657e1a6474605a8be5;p=scons.git Branch for User's Guide changes. git-svn-id: http://scons.tigris.org/svn/scons/trunk@723 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/doc/scons.mod b/doc/scons.mod index f9deaa1e..19190b23 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -15,12 +15,15 @@ --> Aegis"> +Ant"> Autoconf"> +Automake"> Cons"> gcc"> Jam"> Make"> Make++"> +Python"> ranlib"> SCons"> scons"> @@ -61,6 +64,28 @@ + + +--implicit-cache"> +--implicit-deps-changed"> +--implicit-deps-unchanged"> + + + +implicit_cache"> +implicit_deps_changed"> +implicit_deps_unchanged"> + + + build_dir"> +exports"> source"> target"> @@ -255,6 +281,27 @@ hello.h"> hello.o"> prog"> +prog1"> +prog2"> prog.c"> prog.exe"> stdio.h"> + + + ++"> +#"> + + + +scons-announce@lists.sourceforge.net"> +scons-devel@lists.sourceforge.net"> +scons-users@lists.sourceforge.net"> diff --git a/doc/user/ant.sgml b/doc/user/ant.sgml index f83ab639..4eb5007e 100644 --- a/doc/user/ant.sgml +++ b/doc/user/ant.sgml @@ -30,7 +30,18 @@
- XXX + Differences Between &Ant; and &SCons; + + + + XXX + + + +
+ +
+ Advantages of &SCons; Over &Ant; diff --git a/doc/user/cons.sgml b/doc/user/cons.sgml index f83ab639..be02a51f 100644 --- a/doc/user/cons.sgml +++ b/doc/user/cons.sgml @@ -30,7 +30,18 @@
- XXX + Differences Between &Cons; and &SCons; + + + + XXX + + + +
+ +
+ Advantages of &SCons; Over &Cons; diff --git a/doc/user/depends.sgml b/doc/user/depends.sgml index fbbb54ae..2049caf3 100644 --- a/doc/user/depends.sgml +++ b/doc/user/depends.sgml @@ -48,9 +48,8 @@ operating system on which the build is performed (as reported by Cnot waste time rebuilding things that have already been built. You can see this at work simply be re-invoking &SCons; @@ -88,8 +87,8 @@ operating system on which the build is performed (as reported by C - Note that &SCons; only reports "...is up to date" - for target files named explicitly on the command line, + Note that &SCons; reports "...is up to date" + only for target files named explicitly on the command line, to avoid cluttering the output. @@ -102,7 +101,8 @@ operating system on which the build is performed (as reported by Crebuilding - things when a source file changes. + things when a source file changes, + so that the built software is up to date. &SCons; keeps track of this through a &signature; for each source file, and allows you to configure @@ -113,7 +113,7 @@ operating system on which the build is performed (as reported by C
- MD5 Signatures + MD5 Source File Signatures @@ -185,7 +185,7 @@ operating system on which the build is performed (as reported by C
- Time Stamps + Source File Time Stamps @@ -231,17 +231,30 @@ operating system on which the build is performed (as reported by C Target File Signatures + + + As you've just seen, + &SCons; uses signatures to decide whether a + target file is up to date or must be rebuilt. + When a target file depends on another target file, + &SCons; allows you to separately configure + how the signatures of an "intermediate" target file + is used when deciding if a dependent target file + must be rebuilt. + + +
Build Signatures - We've already seen how modifying a source file + Modifying a source file will cause not only its direct target file to be rebuilt, but also the target file(s) that depend on that direct target file. In our example, - changing the contents of &hello_c; cause + changing the contents of the &hello_c; file causes the &hello_o; file to be rebuilt, which in turn causes the &hello; program to be rebuilt: @@ -304,14 +317,13 @@ operating system on which the build is performed (as reported by C - Sometimes, however, - a source file can be changed - in such a way that the - target file(s) built from it - will be rebuilt - exactly the same as the last time. - If so, then any target files - that depend on built-but-not-changed target + Sometimes a source file can be changed + in such a way that the contents of the + rebuilt target file(s) + will be exactly the same as the last time + the file was built. + If so, then any other target files + that depend on such a built-but-not-changed target file actually need not be rebuilt. You can have &SCons; realize that a dependent target file @@ -376,7 +388,7 @@ operating system on which the build is performed (as reported by C#include line - to include &hello_h; file in the compilation: + to include the &hello_h; file in the compilation: @@ -524,11 +536,13 @@ operating system on which the build is performed (as reported by Crebuild + all or part of a large system: + &SCons; will likely take some extra time to "think about" what must be built before it issues the - first build command, - or decides that nothing must be rebuilt. + first build command + (or decides that everything is up to date + and nothing must be rebuilt). +
Acknowledgements @@ -151,23 +264,49 @@ tool without the energy, enthusiasm and time people have contributed over the past few years. The "core team" - of Chad Austin, Anthony Roach, Charles Crain, and Steve Leblanc + of Chad Austin, Anthony Roach, Charles Crain, + Steve Leblanc, Greg Spencer and Christoph Wiedemann have been great about reviewing my (and other) changes and catching problems before they get in the code base. - Technically, + Of particular technical note: Anthony's outstanding and innovative work on the tasking engine - has given &SCons; a vastly superior parallel build model, - and Charles has been the master of the crucial Node infrastructure. + has given &SCons; a vastly superior parallel build model; + Charles has been the master of the crucial Node infrastructure; + Christoph's work on the Configure infrastructure + has added crucial Autoconf-like functionality; + and Greg has provided excellent support + for Microsoft Visual Studio. + + + + + + Special thanks to David Snopek for contributing + his underlying "Autocons" code that formed + the basis of Christoph's work with the Configure functionality. + David was extremely generous in making + this code available to &SCons;, + given that he initially released it under the GPL + and &SCons; is released under a less-restrictive MIT-style license. + + + + + &SCons; has received contributions from many other people, of course: Matt Balvin (extending long command-line support on Win32), + Allen Bierbaum (extensions and fixes to Options), + Steve Christensen (help text sorting and function action signature fixes), Michael Cook (avoiding losing signal bits from executed commands), Derrick 'dman' Hudson (), Alex Jacques (work on the Win32 scons.bat file), Stephen Kennedy (performance enhancements), Lachlan O'Dea (SharedObject() support for masm and normalized paths for the WhereIs() function), - Jeff Petkau (fixes for CacheDir and other areas), + Damyan Pepper (keeping output like Make), + Jeff Petkau (significant fixes for CacheDir and other areas), + Stefan Reichor (Ghostscript support), Zed Shaw (Append() and Replace() environment methods), Terrel Shumway (build and test fixes, as well as the SCons Wiki), sam th (dynamic checks for utilities) @@ -188,6 +327,15 @@ + + + And last, thanks to Guido van Rossum + for his elegant scripting language, + which is the basis not only for the &SCons; implementation, + but for the interface itself. + + +
@@ -201,4 +349,25 @@ + + + If you want to ask general questions about how to use &SCons; + send email to &scons-users;. + + + + + + If you want to contact the &SCons; development community directly, + send email to &scons-devel;. + + + + + + If you want to receive announcements about &SCons, + join the low-volume &scons-announce; mailing list. + + +
diff --git a/doc/user/simple.sgml b/doc/user/simple.sgml index 8f76f2aa..d97badc0 100644 --- a/doc/user/simple.sgml +++ b/doc/user/simple.sgml @@ -21,24 +21,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---> - - @@ -100,7 +82,7 @@ requirements of a build. to specify the name of the source file, and that &SCons; deduces the names of the object and executable files - correctly from the source file. + correctly from the base of the source file name. @@ -113,16 +95,16 @@ requirements of a build. on POSIX systems, hello.obj and hello.exe on Windows systems. - This is a simple example of how easy it is to - use &SCons; to write portable software builds. + This is a simple example of how &SCons; + makes it extremely easy to + write portable software builds. (Note that we won't provide duplicate side-by-side - POSIX and Windows output for the - rest of the examples in this guide; + POSIX and Windows output for all of the examples in this guide; just keep in mind that, unless otherwise specified, any of the examples should work equally well on both types of systems.) @@ -143,15 +125,14 @@ requirements of a build. - What may not be obvious, though, is that - there's an important difference between + There is, however, an important difference between an &SConstruct; file and a &Makefile;: the &SConstruct; file is actually a Python script. - If you're not already familiar with Python, don't worry; - Python is very easy to learn, - and this User's Guide will introduce you step-by-step + If you're not already familiar with Python, don't worry. + This User's Guide will introduce you step-by-step to the relatively small amount of Python you'll need to know to be able to use &SCons; effectively. + And Python is very easy to learn. @@ -188,9 +169,11 @@ requirements of a build. + You've just seen how to configure &SCons; + to compile a program from a single source file. It's more common, of course, that you'll need to build a program from - not just one, but many input source files. + many input source files, not just one. To do this, you need to put the source files in a Python list (enclosed in square brackets), @@ -355,7 +338,7 @@ requirements of a build. &SCons; also allows you to identify the output file and input source files - by Python keyword arguments. + using Python keyword arguments. The output file is known as the target, and the source file(s) are known (logically enough) as the @@ -374,7 +357,8 @@ requirements of a build. Whether or not you choose to use keyword arguments to identify the target and source files - is purely a personal choice. + is purely a personal choice; + &SCons; functions the same either way. @@ -448,8 +432,8 @@ requirements of a build. A more straightforward, but perhaps less convenient, way to share source files between multiple programs - is to simply include the common source files - when listing the source files for each program: + is simply to include the common files + in the lists of source files for each program: @@ -484,12 +468,12 @@ requirements of a build. If two or more programs share a lot of common source files, repeating the common files in the list for each program - a maintenance problem if you need to change the + can be a maintenance problem when you need to change the list of common files. You can simplify this by creating a separate Python list to hold the common file names, and concatenating it with other lists - using the Python &+; operator: + using the Python + operator: