Anonymous avatar Anonymous committed dbf1633

Merged revisions 1784-1824 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core

........
r1786 | stevenknight | 2007-01-25 15:29:15 -0600 (Thu, 25 Jan 2007) | 1 line

0.96.D555 - Doc string updates for TaskMaster to better describe the architecture. Get rid of some no-longer-used code.
........
r1787 | stevenknight | 2007-01-25 23:24:31 -0600 (Thu, 25 Jan 2007) | 1 line

0.96.D556 - Packaging changes to support building packages in an arbitrary directory.
........
r1788 | stevenknight | 2007-01-30 20:35:39 -0600 (Tue, 30 Jan 2007) | 1 line

0.96.D557 - Make the Scanner.Base class able to handle Scanner.Selector functionality (i.e., a dictionary to select other scanners) and prepare to deprecate Scanner.Selector and Scanner.Scanner() in the future.
........
r1789 | stevenknight | 2007-01-30 20:45:23 -0600 (Tue, 30 Jan 2007) | 1 line

0.96.D558 - Add support for a site-scons subdirectory. (Gary Oberbrunner)
........
r1790 | stevenknight | 2007-01-31 00:36:20 -0600 (Wed, 31 Jan 2007) | 1 line

0.96.D559 - Clean up various module imports and other pychecker-detected problems.
........
r1791 | stevenknight | 2007-01-31 11:51:04 -0600 (Wed, 31 Jan 2007) | 1 line

0.96.D560 - Fix detection of Java anonymous classes if a newline precedes the opening brace. (Leanid Nazdrynau)
........
r1792 | stevenknight | 2007-02-02 11:57:59 -0600 (Fri, 02 Feb 2007) | 1 line

0.96.D561 - Add a --bootstrap_src option to bootstrap.py; search the bootstrap.py directory by default. (Greg Noel)
........
r1793 | stevenknight | 2007-02-02 18:04:52 -0600 (Fri, 02 Feb 2007) | 1 line

0.96.D562 - Don't check the build/*/gentoo directories for copyright strings.
........
r1794 | stevenknight | 2007-02-02 18:12:43 -0600 (Fri, 02 Feb 2007) | 1 line

0.96.D563 - Fix pychecker clean-ups on later Python versions.
........
r1795 | stevenknight | 2007-02-02 18:38:47 -0600 (Fri, 02 Feb 2007) | 1 line

0.96.D564 - Add a NoCache() function to allow marking targets as not being suitable for propagating/ to (or retrieving from) CacheDir(). (Dave Vitek)
........
r1796 | stevenknight | 2007-02-02 20:08:33 -0600 (Fri, 02 Feb 2007) | 1 line

0.96.D565 - Add a --tree= option, to make the interface to dumping dependency graphs a little clearner, and give it a 'prune' option to avoid repeating the dependency walk for Nodes we've already visited.
........
r1797 | stevenknight | 2007-02-03 20:37:25 -0600 (Sat, 03 Feb 2007) | 1 line

0.96.D566 - Packaging fix: don't add '#' to the beginning of a build_dir name if it's already an absolute path.
........
r1798 | stevenknight | 2007-02-03 20:53:42 -0600 (Sat, 03 Feb 2007) | 1 line

0.96.D567 - Add backwards-compatibility for set() types, and restore the line that used them in the compatibility _subprocess.py module.
........
r1799 | stevenknight | 2007-02-05 10:30:28 -0600 (Mon, 05 Feb 2007) | 1 line

0.96.D568 - Capture outline and build configuration for a possible future Developer's Guide.
........
r1800 | stevenknight | 2007-02-05 11:03:37 -0600 (Mon, 05 Feb 2007) | 1 line

0.96.D569 - Exclude the new developer guide MANIFEST from Copyright string checks.
........
r1801 | stevenknight | 2007-02-05 11:16:04 -0600 (Mon, 05 Feb 2007) | 1 line

0.96.D570 - Track fix in upstream subprocess.py. (Ralf W. Grosse-Kunstleve)
........
r1802 | stevenknight | 2007-02-05 20:05:59 -0600 (Mon, 05 Feb 2007) | 1 line

0.96.D571 - Change the Windows installer to register scons.bat as an 'App Path', so the directory doesn't need to be added to %PATH%.
........
r1803 | stevenknight | 2007-02-05 21:33:01 -0600 (Mon, 05 Feb 2007) | 1 line

0.96.D572 - Prepare SConf for use with the subprocess module by refactoring the Unbuffered class.
........
r1804 | stevenknight | 2007-02-05 22:37:09 -0600 (Mon, 05 Feb 2007) | 1 line

0.96.D573 - Get rid of left-over Node.Node.{pre,post}_actions attributes.
........
r1805 | stevenknight | 2007-02-06 12:04:14 -0600 (Tue, 06 Feb 2007) | 1 line

0.96.D574 - Remove leftover print in the test/CacheDir/NoCache.py test.
........
r1806 | stevenknight | 2007-02-06 17:11:03 -0600 (Tue, 06 Feb 2007) | 1 line

0.96.D575 - Support the ability to evaluate a ${} construction variable to select the spawner function.
........
r1809 | stevenknight | 2007-02-07 00:30:10 -0600 (Wed, 07 Feb 2007) | 1 line

0.96.D576 - Documentation fixes and updates.
........
r1810 | stevenknight | 2007-02-07 15:51:20 -0600 (Wed, 07 Feb 2007) | 1 line

0.96.D577 - Don't expect a bootstrap.py runtest.py file to be generated when swig -noproxy is used.
........
r1811 | stevenknight | 2007-02-07 16:55:06 -0600 (Wed, 07 Feb 2007) | 1 line

0.96.D578 - Make --srcdir a synonym for -Y/--repository.
........
r1812 | stevenknight | 2007-02-07 23:46:22 -0600 (Wed, 07 Feb 2007) | 1 line

0.96.D579 - More doc updates: PathAccept, #include+Repository double-quote limitation.
........
r1817 | stevenknight | 2007-02-08 12:46:42 -0600 (Thu, 08 Feb 2007) | 1 line

0.96.D580 - Fix use of toolpath with BuildDir.
........
r1818 | stevenknight | 2007-02-08 12:59:23 -0600 (Thu, 08 Feb 2007) | 1 line

0.96.D581 - Enable build of the text version of the User's Guide.
........
r1819 | stevenknight | 2007-02-08 14:21:31 -0600 (Thu, 08 Feb 2007) | 1 line

0.96.D582 - Fix handling of Java inner classes with JARCHDIR.
........
r1820 | stevenknight | 2007-02-08 14:39:33 -0600 (Thu, 08 Feb 2007) | 1 line

0.96.D583 - Add linking with -lm to the dmd.py Tool smart linker. (Anonymous)
........
r1821 | stevenknight | 2007-02-08 17:26:29 -0600 (Thu, 08 Feb 2007) | 1 line

0.96.D584 - Fix ParseConfig() when *FLAGS variables have been replaced with strings.
........
r1822 | stevenknight | 2007-02-09 12:21:17 -0600 (Fri, 09 Feb 2007) | 1 line

0.96.D585 - Fix installation of file names beginning with #. (Dave Weber)
........
r1823 | stevenknight | 2007-02-09 14:14:47 -0600 (Fri, 09 Feb 2007) | 1 line

0.96.D586 - Post-review improvements to recent toolpath and MergeFlags() changes. (Gary Oberbrunner, Greg Noel)
........
r1824 | stevenknight | 2007-02-10 00:53:13 -0600 (Sat, 10 Feb 2007) | 1 line

0.96.D587 - Commonize flags initialization between the c and c++ Tools.
........

Comments (0)

Files changed (145)

HOWTO/release.txt

 
         Check in any changes necessary to make everything work
 
+    Update the user's guide
+
+        sh bin/docdiff
+
+        sh bin/docupdate
+
     END THE CURRENT DEVELOPMENT BRANCH
 
         ae_p scons.0

HOWTO/subrelease.txt

 
 Things to do to release a new X.Y.Z version of SCons:
 
+    BEFORE STARTING THE SUB-BRANCH:
+    
+        Update the user's guide on the parent
+
+            sh bin/docdiff
+
+            sh bin/docupdate
+
     START THE NEW SUB-BRANCH FOR SUBRELEASE
 
         aenbr -p scons.0.{94} {1}

QMTest/SConscript

 
 import os.path
 
-Import('env')
+Import('build_dir', 'env')
 
 files = [
     'classes.qmc',
     # Guarantee that real copies of these files always exist in
     # build/QMTest.  If there's a symlink there, then this is an Aegis
     # build and we blow them away now so that they'll get "built" later.
-    p = os.path.join('build', 'QMTest', file)
+    p = os.path.join(build_dir, 'QMTest', file)
     if os.path.islink(p):
         os.unlink(p)
-    sp = '#' + p
-    env.Command(sp, file, copy)
-    Local(sp)
+    if not os.path.isabs(p):
+        p = '#' + p
+    env.Command(p, file, copy)
+    Local(p)
 default_version = '0.96.94'
 copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
 
-Default('.')
-
 SConsignFile()
 
 #
     if os.environ.has_key(key):
         ENV[key] = os.environ[key]
 
-cwd_build = os.path.join(os.getcwd(), "build")
+build_dir = ARGUMENTS.get('BUILDDIR', 'build')
+if not os.path.isabs(build_dir):
+    build_dir = os.path.normpath(os.path.join(os.getcwd(), build_dir))
+
+Default('.', build_dir)
 
 packaging_flavors = [
     'deb',
     'local-zip',
 ]
 
-test_deb_dir          = os.path.join(cwd_build, "test-deb")
-test_rpm_dir          = os.path.join(cwd_build, "test-rpm")
-test_tar_gz_dir       = os.path.join(cwd_build, "test-tar-gz")
-test_src_tar_gz_dir   = os.path.join(cwd_build, "test-src-tar-gz")
-test_local_tar_gz_dir = os.path.join(cwd_build, "test-local-tar-gz")
-test_zip_dir          = os.path.join(cwd_build, "test-zip")
-test_src_zip_dir      = os.path.join(cwd_build, "test-src-zip")
-test_local_zip_dir    = os.path.join(cwd_build, "test-local-zip")
+test_deb_dir          = os.path.join(build_dir, "test-deb")
+test_rpm_dir          = os.path.join(build_dir, "test-rpm")
+test_tar_gz_dir       = os.path.join(build_dir, "test-tar-gz")
+test_src_tar_gz_dir   = os.path.join(build_dir, "test-src-tar-gz")
+test_local_tar_gz_dir = os.path.join(build_dir, "test-local-tar-gz")
+test_zip_dir          = os.path.join(build_dir, "test-zip")
+test_src_zip_dir      = os.path.join(build_dir, "test-src-zip")
+test_local_zip_dir    = os.path.join(build_dir, "test-local-zip")
 
-unpack_tar_gz_dir     = os.path.join(cwd_build, "unpack-tar-gz")
-unpack_zip_dir        = os.path.join(cwd_build, "unpack-zip")
+unpack_tar_gz_dir     = os.path.join(build_dir, "unpack-tar-gz")
+unpack_zip_dir        = os.path.join(build_dir, "unpack-zip")
 
 if platform == "win32":
     tar_hflag = ''
                    ENV                 = ENV,
 
                    BUILD               = build_id,
+                   BUILDDIR            = build_dir,
                    BUILDSYS            = build_system,
                    COPYRIGHT           = copyright,
                    DATE                = date,
                             'sconsign.1',
                             'scons-time.1',
                             'script/scons.bat',
+                            'script/scons-post-install.py',
                             'setup.cfg',
                             'setup.py',
                           ],
 
         'filemap'       : {
-                            'scons.1' : '../build/doc/man/scons.1',
-                            'sconsign.1' : '../build/doc/man/sconsign.1',
-                            'scons-time.1' : '../build/doc/man/scons-time.1',
+                            'scons.1' : '$BUILDDIR/doc/man/scons.1',
+                            'sconsign.1' : '$BUILDDIR/doc/man/sconsign.1',
+                            'scons-time.1' : '$BUILDDIR/doc/man/scons-time.1',
                           },
 
         'buildermap'    : {
                            },
 }
 
-scripts = ['scons', 'sconsign']
+scripts = ['scons', 'sconsign', 'scons-time']
 
 src_deps = []
 src_files = []
     if p.has_key('src_subdir'):
         src = os.path.join(src, p['src_subdir'])
 
-    build = os.path.join('build', pkg)
+    build = os.path.join(build_dir, pkg)
 
     tar_gz = os.path.join(build, 'dist', "%s.tar.gz" % pkg_version)
     platform_tar_gz = os.path.join(build,
     #
     for b in src_files:
         s = p['filemap'].get(b, b)
+        if not s[0] == '$' and not os.path.isabs(s):
+            s = os.path.join(src, s)
         builder = p['buildermap'].get(b, env.SCons_revision)
-        x = builder(os.path.join(build, b), os.path.join(src, s))
+        x = builder(os.path.join(build, b), s)
         Local(x)
 
     #
         #
         # Generate portage files for submission to Gentoo Linux.
         #
-        gentoo = os.path.join('build', 'gentoo')
+        gentoo = os.path.join(build, 'gentoo')
         ebuild = os.path.join(gentoo, 'scons-%s.ebuild' % version)
         digest = os.path.join(gentoo, 'files', 'digest-scons-%s' % version)
         env.Command(ebuild, os.path.join('gentoo', 'scons.ebuild.in'), SCons_revision)
         ])
 
     if rpmbuild:
-        topdir = os.path.join(os.getcwd(), build, 'build',
+        topdir = os.path.join(build, 'build',
                               'bdist.' + platform, 'rpm')
 
-        buildroot = os.path.join(os.getcwd(), 'build', 'rpm-buildroot')
+        buildroot = os.path.join(build_dir, 'rpm-buildroot')
 
         BUILDdir = os.path.join(topdir, 'BUILD', pkg + '-' + version)
         RPMSdir = os.path.join(topdir, 'RPMS', 'noarch')
     if dh_builddeb and fakeroot:
         # Our Debian packaging builds directly into build/dist,
         # so we don't need to add the .debs to install_targets.
-        deb = os.path.join('build', 'dist', "%s_%s-1_all.deb" % (pkg, version))
+        deb = os.path.join(build_dir, 'dist', "%s_%s-1_all.deb" % (pkg, version))
         for d in p['debian_deps']:
             b = env.SCons_revision(os.path.join(build, d), d)
             env.Depends(deb, b)
     #
     s_l_v = '%s-local-%s' % (pkg, version)
 
-    local = os.path.join('build', pkg + '-local')
-    cwd_local = os.path.join(os.getcwd(), local)
-    cwd_local_slv = os.path.join(os.getcwd(), local, s_l_v)
+    local = pkg + '-local'
+    build_dir_local = os.path.join(build_dir, local)
+    build_dir_local_slv = os.path.join(build_dir, local, s_l_v)
 
-    local_tar_gz = os.path.join('build', 'dist', "%s.tar.gz" % s_l_v)
-    local_zip = os.path.join('build', 'dist', "%s.zip" % s_l_v)
+    local_tar_gz = os.path.join(build_dir, 'dist', "%s.tar.gz" % s_l_v)
+    local_zip = os.path.join(build_dir, 'dist', "%s.zip" % s_l_v)
 
     commands = [
-        Delete(local),
+        Delete(build_dir_local),
         '$PYTHON $PYTHONFLAGS $SETUP_PY install "--install-script=%s" "--install-lib=%s" --no-install-man --no-compile --standalone-lib --no-version-script' % \
-                                                (cwd_local, cwd_local_slv),
+                                                (build_dir_local, build_dir_local_slv),
     ]
 
     for script in scripts:
         #commands.append("mv %s/%s %s/%s.py" % (local, script, local, script))
-        local_script = os.path.join(local, script)
+        local_script = os.path.join(build_dir_local, script)
         commands.append(Move(local_script + '.py', local_script))
 
     rf = filter(lambda x: not x in scripts, raw_files)
     rf = map(lambda x, slv=s_l_v: os.path.join(slv, x), rf)
     for script in scripts:
         rf.append("%s.py" % script)
-    local_targets = map(lambda x, s=local: os.path.join(s, x), rf)
+    local_targets = map(lambda x, s=build_dir_local: os.path.join(s, x), rf)
 
     env.Command(local_targets, build_src_files, commands)
 
-    scons_LICENSE = os.path.join(local, 'scons-LICENSE')
+    scons_LICENSE = os.path.join(build_dir_local, 'scons-LICENSE')
     l = env.SCons_revision(scons_LICENSE, 'LICENSE-local')
     local_targets.append(l)
     Local(l)
 
-    scons_README = os.path.join(local, 'scons-README')
+    scons_README = os.path.join(build_dir_local, 'scons-README')
     l = env.SCons_revision(scons_README, 'README-local')
     local_targets.append(l)
     Local(l)
     if gzip:
         env.Command(local_tar_gz,
                     local_targets,
-                    "cd %s && tar czf $( ${TARGET.abspath} $) *" % local)
+                    "cd %s && tar czf $( ${TARGET.abspath} $) *" % build_dir_local)
 
         unpack_targets = map(lambda x, d=test_local_tar_gz_dir:
                                     os.path.join(d, x),
 
     if zipit:
         env.Command(local_zip, local_targets, zipit,
-                    CD = local, PSV = '.')
+                    CD = build_dir_local, PSV = '.')
 
         unpack_targets = map(lambda x, d=test_local_zip_dir:
                                     os.path.join(d, x),
     # And, lastly, install the appropriate packages in the
     # appropriate subdirectory.
     #
-    b_d_files = env.Install(os.path.join('build', 'dist'), install_targets)
+    b_d_files = env.Install(os.path.join(build_dir, 'dist'), install_targets)
     Local(b_d_files)
 
 #
 #
 #
-Export('env')
+Export('build_dir', 'env')
 
 SConscript('QMTest/SConscript')
 
     # Guarantee that real copies of these files always exist in
     # build/.  If there's a symlink there, then this is an Aegis
     # build and we blow them away now so that they'll get "built" later.
-    p = os.path.join('build', file)
+    p = os.path.join(build_dir, file)
     if os.path.islink(p):
         os.unlink(p)
-    sp = '#' + p
-    env.Command(sp, file, copy)
+    if not os.path.isabs(p):
+        p = '#' + p
+    sp = env.Command(p, file, copy)
     Local(sp)
 
 #
 # Documentation.
 #
-Export('env', 'whereis')
+Export('build_dir', 'env', 'whereis')
 
 SConscript('doc/SConscript')
 
     if sfiles:
         ps = "%s-src" % project
         psv = "%s-%s" % (ps, version)
-        b_ps = os.path.join('build', ps)
-        b_psv = os.path.join('build', psv)
+        b_ps = os.path.join(build_dir, ps)
+        b_psv = os.path.join(build_dir, psv)
         b_psv_stamp = b_psv + '-stamp'
 
-        src_tar_gz = os.path.join('build', 'dist', '%s.tar.gz' % psv)
-        src_zip = os.path.join('build', 'dist', '%s.zip' % psv)
+        src_tar_gz = os.path.join(build_dir, 'dist', '%s.tar.gz' % psv)
+        src_zip = os.path.join(build_dir, 'dist', '%s.zip' % psv)
 
         Local(src_tar_gz, src_zip)
 

bin/check

-#! /bin/sh
-
-# This script runs pychecker on the SCons source and creates a file called
-# checks.txt with the results. It must be run in the src/engine directory.
-
-base=`basename $PWD`
-if [ "$base" != "engine" ]; then
-   echo "You must run this script from the engine directory."
-   exit
-fi
-
-DEVDIR=../../doc/developer
-SRCFILE=../../bin/files
-CHKFILE=checks.txt
-
-rm -f $CHKFILE
-for f in `cat $SRCFILE` ; do
-   echo >> $CHKFILE
-   echo " --- $f ---" >> $CHKFILE
-   env PYTHONPATH=. pychecker -T -z -Z --deprecated $f >> $CHKFILE
-done
-
-if [ -e $CHKFILE ]; then
-   sed -e "s|$PWD/||" $CHKFILE > /tmp/tmpchk
-   mv -f /tmp/tmpchk $CHKFILE
-fi

bin/sconsoutput.py

 import sys
 import time
 
-sys.path.append(os.path.join(os.getcwd(), 'etc'))
-sys.path.append(os.path.join(os.getcwd(), 'build', 'etc'))
+sys.path.append(os.path.join(os.getcwd(), 'QMTest'))
+sys.path.append(os.path.join(os.getcwd(), 'build', 'QMTest'))
 
 scons_py = os.path.join('bootstrap', 'src', 'script', 'scons.py')
 if not os.path.exists(scons_py):
 ToolList = {
     'posix' :   [('cc', ['CCCOM', 'SHCCCOM'], CCCom, ['CCFLAGS', 'CPPDEFINES', 'COLOR', 'COLORS', 'PACKAGE']),
                  ('link', ['LINKCOM', 'SHLINKCOM'], Cat, []),
-                 ('ar', 'ARCOM', Cat, []),
+                 ('ar', ['ARCOM', 'RANLIBCOM'], Cat, []),
                  ('tar', 'TARCOM', Null, []),
                  ('zip', 'ZIPCOM', Null, []),
                  ('BitKeeper', 'BITKEEPERCOM', Cat, []),
     os.environ.update(save_vals)
     for key in delete_keys:
         del(os.environ[key])
-    out = string.replace(test.stdout(), test.workpath('ROOT'), '')
+    out = test.stdout()
+    out = string.replace(out, test.workpath('ROOT'), '')
+    out = string.replace(out, test.workpath('WORK/SConstruct'),
+                              '/home/my/project/SConstruct')
     lines = string.split(out, '\n')
     if lines:
         while lines[-1] == '':
 
 import os
 import os.path
-import getopt
 import string
 import sys
 
         bootstrap.py script only updates the bootstrap copy if the
         content of the source copy is different.
 
+    --bootstrap_src=DIR
+
+        Searches for the SCons files relative to the specified DIR,
+        then relative to the directory in which this bootstrap.py
+        script is found.
+
     --bootstrap_update
 
         Only updates the bootstrap subdirectory, and then exits.
 
 In addition to the above options, the bootstrap.py script understands
-the -Y and --repository= options, which are used under Aegis to specify
-a search path for the source files that may not have been copied in to
-the Aegis change.
+the following SCons options:
+
+    -C, --directory
+
+        Changes to the specified directory before invoking SCons.
+        Because we change directory right away to the specified directory,
+        the SCons script itself doesn't need to, so this option gets
+        "eaten" by the bootstrap.py script.
+
+    -Y, --repository
+
+        These options are used under Aegis to specify a search path
+        for the source files that may not have been copied in to the
+        Aegis change.
 
 This is essentially a minimal build of SCons to bootstrap ourselves into
 executing it for the full build of all the packages, as specified in our
 
 bootstrap_dir = 'bootstrap'
 pass_through_args = []
-search = ['.']
 update_only = None
 
 requires_an_argument = 'bootstrap.py:  %s requires an argument\n'
 
-command_line_args = sys.argv[1:]
-
 def must_copy(dst, src):
     if not os.path.exists(dst):
         return 1
     return open(dst, 'rb').read() != open(src, 'rb').read()
 
+search = [os.path.dirname(sys.argv[0])]
+if search[0] == '': search[0] = '.'
+
+# Note:  We don't use the getopt module to process the command-line
+# arguments because we'd have to teach it about all of the SCons options.
+
+command_line_args = sys.argv[1:]
+
 while command_line_args:
     arg = command_line_args.pop(0)
 
         except IndexError:
             sys.stderr.write(requires_an_argument % arg)
             sys.exit(1)
-
     elif arg[:16] == '--bootstrap_dir=':
         bootstrap_dir = arg[16:]
 
         def must_copy(dst, src):
             return 1
 
+    elif arg == '--bootstrap_src':
+        try:
+            search.insert(0, command_line_args.pop(0))
+        except IndexError:
+            sys.stderr.write(requires_an_argument % arg)
+            sys.exit(1)
+    elif arg[:16] == '--bootstrap_src=':
+        search.insert(0, arg[16:])
+
     elif arg == '--bootstrap_update':
         update_only = 1
 
+    elif arg in ('-C', '--directory'):
+        try:
+            dir = command_line_args.pop(0)
+        except IndexError:
+            sys.stderr.write(requires_an_argument % arg)
+            sys.exit(1)
+        else:
+            os.chdir(dir)
+    elif arg[:2] == '-C':
+        os.chdir(arg[2:])
+    elif arg[:12] == '--directory=':
+        os.chdir(arg[12:])
+
     elif arg in ('-Y', '--repository'):
         try:
             dir = command_line_args.pop(0)
         else:
             search.append(dir)
         pass_through_args.extend([arg, dir])
-
     elif arg[:2] == '-Y':
         search.append(arg[2:])
         pass_through_args.append(arg)
-
     elif arg[:13] == '--repository=':
         search.append(arg[13:])
         pass_through_args.append(arg)
 def find(file, search=search):
     for dir in search:
         f = os.path.join(dir, file)
-	if os.path.exists(f):
-	    return os.path.normpath(f)
+        if os.path.exists(f):
+            return os.path.normpath(f)
     sys.stderr.write("could not find `%s' in search path:\n" % file)
     sys.stderr.write("\t" + string.join(search, "\n\t") + "\n")
     sys.exit(2)
  *
  * Look in aesub(5) for more information about command substitutions.
  */
-build_command = "python2.1 ${Source bootstrap.py} -Y${SUBSTitute : \\ -Y $Search_Path} date='${DAte %Y/%m/%d %H:%M:%S}' developer=${DEVeloper} version=${VERsion} change=${Change}";
+build_command = "python2.4 ${Source bootstrap.py} -Y${SUBSTitute : \\ -Y $Search_Path} date='${DAte %Y/%m/%d %H:%M:%S}' developer=${DEVeloper} version=${VERsion} change=${Change}";
 
 /*
  * SCons removes its targets before constructing them, which qualifies it
 import re
 import string
 
-Import('env', 'whereis')
+Import('build_dir', 'env', 'whereis')
 
 env = env.Clone()
 
 env.TargetSignatures('content')
 
-build = os.path.join('#build', 'doc')
+build = os.path.join(build_dir, 'doc')
 
 #
 #
 #
-doc_tar_gz = os.path.join('#build',
+doc_tar_gz = os.path.join(build_dir,
                           'dist',
                           'scons-doc-%s.tar.gz' % env.Dictionary('VERSION'))
 
                 'pdf'       : 1,
                 'text'      : 0,
         },
+        # For whenever (if ever?) we start putting developer guide
+        # information in a printable document instead of the wiki.
+        #'developer' : {
+        #        'htmlindex' : 'book1.html',
+        #        'html'      : 1,
+        #        'ps'        : 1,
+        #        'pdf'       : 1,
+        #        'text'      : 0,
+        #},
         'user' : {
                 'htmlindex' : 'book1.html',
                 'html'      : 1,
                 'ps'        : 1,
                 'pdf'       : 1,
-                'text'      : 0,
+                'text'      : 1,
                 'graphics'  : [
                                 'SCons-win32-install-1.jpg',
                                 'SCons-win32-install-2.jpg',
 
         # Hard-coding the scons-src path is a bit of a hack.  This can
         # be reworked when a better solution presents itself.
-        scons_src_main = os.path.join('#build', 'scons-src', 'doc', main)
+        scons_src_main = os.path.join(build_dir, 'scons-src', 'doc', main)
         env.Ignore(scons_src_main, version_sgml)
 
         htmldir = os.path.join(build, 'HTML', 'scons-%s' % doc)
 man_page_list = ['scons.1', 'sconsign.1', 'scons-time.1']
 
 for m in man_page_list:
-    orig_env.SCons_revision(os.path.join(build, 'man', m),
+    x = orig_env.SCons_revision(os.path.join(build, 'man', m),
                             os.path.join('man', m))
 
 man_i_files = ['builders.man', 'tools.man', 'variables.man']
             return 0
 
         cmds = [
-            "( cd build/doc/man && cp %s .. )" % string.join(man_i_files),
+            "( cd %s/man && cp %s .. )" % (build, string.join(man_i_files)),
             "( cd ${SOURCE.dir} && man2html ${SOURCE.file} ) > $TARGET",
             Action(strip_to_first_html_tag),
         ]

doc/developer/MANIFEST

+architecture.sgml
+branches.sgml
+copyright.sgml
+cycle.sgml
+main.sgml
+packaging.sgml
+preface.sgml
+sourcetree.sgml
+testing.sgml

doc/developer/architecture.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  XXX
+
+  </para>
+
+  <section>
+  <title>Architecture</title>
+
+    <para>
+
+    XXX
+    </para>
+
+  </section>

doc/developer/branches.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  XXX
+
+  </para>
+
+  <section>
+  <title>&SCons; Branches</title>
+
+    <para>
+
+    XXX
+    </para>
+
+  </section>

doc/developer/copyright.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+<blockquote>
+ <para>
+
+  SCons Developer's Guide Copyright (c) 2007 Steven Knight
+
+ </para>
+</blockquote>

doc/developer/cycle.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  XXX
+
+  </para>
+
+  <section>
+  <title>Development Cycle</title>
+
+    <para>
+
+    XXX
+    </para>
+
+  </section>

doc/developer/main.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+<!doctype book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
+[
+
+    <!ENTITY % version SYSTEM "../version.sgml">
+    %version;
+
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+
+    <!ENTITY architecture SYSTEM "architecture.sgml">
+    <!ENTITY branches SYSTEM "branches.sgml">
+    <!ENTITY copyright SYSTEM "copyright.sgml">
+    <!ENTITY cycle SYSTEM "cycle.sgml">
+    <!ENTITY packaging SYSTEM "packaging.sgml">
+    <!ENTITY preface SYSTEM "preface.sgml">
+    <!ENTITY sourcetree SYSTEM "sourcetree.sgml">
+    <!ENTITY testing SYSTEM "testing.sgml">
+
+]>
+
+<book>
+  <bookinfo>
+    <title>SCons Developer's Guide &buildversion;</title>
+
+    <author>
+      <firstname>Steven</firstname>
+      <surname>Knight</surname>
+    </author>
+
+    <edition>Revision &buildrevision; (&builddate;)</edition>
+
+    <pubdate>2007</pubdate>
+
+    <copyright>
+      <year>2007</year>
+      <holder>Steven Knight</holder>
+    </copyright>
+
+    <legalnotice>
+      &copyright;
+    </legalnotice>
+
+    <releaseinfo>version &buildversion;</releaseinfo>
+
+  </bookinfo>
+
+  <preface id="chap-preface">
+    <title>Preface</title>
+    &preface;
+  </preface>
+
+  <chapter id="chap-development-cycle">
+    <title>Development Cycle</title>
+    &cycle;
+  </chapter>
+
+  <chapter id="chap-source-tree">
+    <title>Source Tree</title>
+    &sourcetree;
+  </chapter>
+
+  <chapter id="chap-testing">
+    <title>Testing</title>
+    &testing;
+  </chapter>
+
+  <chapter id="chap-branches">
+    <title>Branches</title>
+    &branches;
+  </chapter>
+
+  <chapter id="chap-packaging">
+    <title>Packaging</title>
+    &packaging;
+  </chapter>
+
+  <chapter id="chap-architecture">
+    <title>Architecture</title>
+    &architecture;
+  </chapter>
+
+</book>

doc/developer/packaging.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  XXX
+
+  </para>
+
+  <section>
+  <title>Packaging</title>
+
+    <para>
+
+    XXX
+    </para>
+
+  </section>

doc/developer/preface.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  This document assumes that you already know how &SCons;
+  and that you want to learn how to work on the code.
+
+  </para>
+
+  <section>
+  <title>&SCons; Principles</title>
+
+    <para>
+
+    There are a few overriding principles
+    we try to live up to in designing and implementing &SCons:
+
+    </para>
+
+    <variablelist>
+
+      <varlistentry>
+      <term>Correctness</term>
+
+      <listitem>
+      <para>
+
+      First and foremost,
+      by default, &SCons; guarantees a correct build
+      even if it means sacrificing performance a little.
+      We strive to guarantee the build is correct
+      regardless of how the software being built is structured,
+      how it may have been written,
+      or how unusual the tools are that build it.
+
+      </para>
+      </listitem>
+      </varlistentry>
+
+      <varlistentry>
+      <term>Performance</term>
+
+      <listitem>
+      <para>
+
+      Given that the build is correct,
+      we try to make &SCons; build software
+      as quickly as possible.
+      In particular, wherever we may have needed to slow
+      down the default &SCons; behavior to guarantee a correct build,
+      we also try to make it easy to speed up &SCons;
+      through optimization options that let you trade off
+      guaranteed correctness in all end cases for
+      a speedier build in the usual cases.
+
+      </para>
+      </listitem>
+      </varlistentry>
+
+      <varlistentry>
+      <term>Convenience</term>
+
+      <listitem>
+      <para>
+
+      &SCons; tries to do as much for you out of the box as reasonable,
+      including detecting the right tools on your system
+      and using them correctly to build the software.
+
+      </para>
+      </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>
+
+    In a nutshell, we try hard to make &SCons; just
+    "do the right thing" and build software correctly,
+    with a minimum of hassles.
+
+    </para>
+
+  </section>
+
+  <section>
+  <title>Acknowledgements</title>
+
+    <para>
+
+    &SCons; would not exist without a lot of help
+    from a lot of people,
+    many of whom may not even be aware
+    that they helped or served as inspiration.
+    So in no particular order,
+    and at the risk of leaving out someone:
+
+    </para>
+
+    <para>
+
+    First and foremost,
+    &SCons; owes a tremendous debt to Bob Sidebotham,
+    the original author of the classic Perl-based &Cons; tool
+    which Bob first released to the world back around 1996.
+    Bob's work on Cons classic provided the underlying architecture
+    and model of specifying a build configuration
+    using a real scripting language.
+    My real-world experience working on Cons
+    informed many of the design decisions in SCons,
+    including the improved parallel build support,
+    making Builder objects easily definable by users,
+    and separating the build engine from the wrapping interface.
+
+    </para>
+
+    <para>
+
+    Greg Wilson was instrumental in getting
+    &SCons; started as a real project
+    when he initiated the Software Carpentry design
+    competition in February 2000.
+    Without that nudge,
+    marrying the advantages of the Cons classic
+    architecture with the readability of Python
+    might have just stayed no more than a nice idea.
+
+    </para>
+
+    <para>
+
+    Thanks to Peter Miller
+    for his splendid change management system, &Aegis;,
+    which has provided the &SCons; project
+    with a robust development methodology from day one,
+    and which showed me how you could
+    integrate incremental regression tests into
+    a practical development cycle
+    (years before eXtreme Programming arrived on the scene).
+
+    </para>
+
+    <para>
+
+    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.
+
+    </para>
+
+  </section>

doc/developer/sourcetree.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  XXX
+
+  </para>
+
+  <section>
+  <title>Source Tree</title>
+
+    <para>
+
+    XXX
+    </para>
+
+  </section>

doc/developer/testing.sgml

+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+  XXX
+
+  </para>
+
+  <section>
+  <title>Testing</title>
+
+    <para>
+
+    XXX
+    </para>
+
+  </section>
 programs, object files, libraries), so that for most software
 projects, only the target and input files need be specified.
 
+Before reading the
+.I SConstruct
+file,
+.B scons
+adds looks for a dir named
+.I site_scons
+in the dir containing the
+.I SConstruct
+file; it adds that
+.I site_scons
+to sys.path, reads the file
+.IR site_scons/site_init.py ,
+and adds the directory
+.I site_scons/site_tools
+to the default toolpath, if those exist.  See the
+.I --no-site-dir
+and
+.I --site-dir
+options for more details.
+
 .B scons
 reads and executes the SConscript files as Python scripts,
 so you may use normal Python scripting capabilities
 
 .TP
 --debug=dtree
-Print the dependency tree
-after each top-level target is built. This prints out only derived files.
+A synonym for the newer
+.B --tree=derived
+option.
+This will be deprecated in some future release
+and ultimately removed.
 
 .TP
 --debug=explain
 
 .TP
 --debug=stree
-Print the dependency tree along with status information.  This is the
-same as the debug=tree option, but additional status information is
-provided for each node in the tree.
+A synonym for the newer
+.B --tree=all,status
+option.
+This will be deprecated in some future release
+and ultimately removed.
 
 .TP
 --debug=time
 
 .TP
 --debug=tree
-Print the dependency tree
-after each top-level target is built. This prints out the complete
-dependency tree including implicit dependencies and ignored
-dependencies.
+A synonym for the newer
+.B --tree=all
+option.
+This will be deprecated in some future release
+and ultimately removed.
 
 .TP
 .RI --diskcheck= types
 options
 are used, the directories are searched in the order specified.
 
+.TP 
+.RI --no-site-dir
+Prevents the automatic addition of the standard
+.I site_scons
+dir to
+.IR sys.path .
+Also prevents loading the
+.I site_scons/site_init.py
+module if it exists, and prevents adding
+.I site_scons/site_tools
+to the toolpath.
+
 .TP
 --implicit-cache
 Cache implicit dependencies. This can cause 
 Ignored for compatibility with GNU 
 .BR make .
 
+.TP 
+.RI --site-dir= dir
+Uses the named dir as the site dir rather than the default
+.I site_scons
+dir.  This dir will get prepended to
+.IR sys.path ,
+the module
+.IR dir /site_init.py
+will get loaded if it exists, and
+.IR dir /site_tools
+will get added to the default toolpath.
+
 .TP
 -t, --touch
 Ignored for compatibility with GNU
 may be used to specify the standard output.
 
 .TP
+.RI -tree= options
+Prints a tree of the dependencies
+after each top-level target is built.
+This prints out some or all of the tree,
+in various formats,
+depending on the
+.I options
+specified:
+
+.TP
+--tree=all
+Print the entire dependency tree
+after each top-level target is built.
+This prints out the complete dependency tree,
+including implicit dependencies and ignored dependencies.
+
+.TP
+--tree=derived
+Restricts the tree output to only derived (target) files,
+not source files.
+
+.TP
+--tree=status
+Prints status information for each displayed node.
+
+.TP
+--tree=prune
+Prunes the tree to avoid repeating dependency information
+for nodes that have already been displayed.
+Any node that has already been displayed
+will have its name printed in
+.BR "[square brackets]" ,
+as an indication that the dependencies
+for that node can be found by searching
+for the relevant output higher up in the tree.
+
+.IP
+Multiple options may be specified,
+separated by commas:
+
+.ES
+# Prints only derived files, with status information:
+scons --tree=derived,status
+
+# Prints all dependencies of target, with status information
+# and pruning dependencies of already-visited Nodes:
+scons --tree=all,prune,status target
+.EE
+
+.TP
 -u, --up, --search-up
 Walks up the directory structure until an 
 .I SConstruct ,
 after other processing.
 
 .TP
+--no-print-directory
+Turn off -w, even if it was turned on implicitly.
+
+.TP
 .RI --warn= type ", --warn=no-" type
 Enable or disable warnings.
 .I type
 Enables or disables all warnings.
 
 .TP
+--warn=cache-write-error, --warn=no-cache-write-error
+Enables or disables warnings about errors trying to
+write a copy of a built file to a specified
+.BR CacheDir ().
+These warnings are disabled by default.
+
+.TP
+--warn=corrupt-sconsign, --warn=no-corrupt-sconsign
+Enables or disables warnings about unfamiliar signature data in
+.B .sconsign
+files.
+These warnings are enabled by default.
+
+.TP
 --warn=dependency, --warn=no-dependency
 Enables or disables warnings about dependencies.
 These warnings are disabled by default.
 These warnings are enabled by default.
 
 .TP
+--warn=duplicate-environment, --warn=no-duplicate-environment
+Enables or disables warnings about missing SConscript files.
+
+.TP
+--warn=misleading-keywords, --warn=no-misleading-keywords
+Enables or disables warnings about use of the misspelled keywords
+.B targets
+and
+.B sources
+when calling Builders.
+(Note the last
+.B s
+characters, the correct spellings are
+.B target
+and
+.B source.)
+These warnings are enabled by default.
+
+.TP
 --warn=missing-sconscript, --warn=no-missing-sconscript
-Enables or disables warnings about missing SConscript files.
+Enables or disables warnings about attempts to specify a build
+of a target with two different construction environments
+that use the same action.
 These warnings are enabled by default.
 
 .TP
---no-print-directory
-Turn off -w, even if it was turned on implicitly.
+--warn=no-md5-module, --warn=no-no-md5-module
+Enables or disables warnings about the version of Python
+not having an MD5 checksum module available.
+These warnings are enabled by default.
+
+.TP
+--warn=no-metaclass-support, --warn=no-no-metaclass-support
+Enables or disables warnings about the version of Python
+not supporting metaclasses when the
+.B --debug=memoizer
+option is used.
+These warnings are enabled by default.
+
+.TP
+--warn=no-parallel-support, --warn=no-no-parallel-support
+Enables or disables warnings about the version of Python
+not being able to support parallel builds when the
+.B -j
+option is used.
+These warnings are enabled by default.
+
+.TP
+--warn=reserved-variable, --warn=no-reserved-variable
+Enables or disables warnings about attempts to set the
+reserved construction variable names
+.BR TARGET ,
+.BR TARGETS ,
+.BR SOURCE
+or
+.BR SOURCES .
+These warnings are disabled by default.
 
 .\" .TP
 .\" .RI --write-filenames= file
 .\" Warn when an undefined variable is referenced.
 
 .TP 
-.RI -Y " repository" ", --repository=" repository
+.RI -Y " repository" ", --repository=" repository ", --srcdir=" repository
 Search the specified repository for any input and target
 files not found in the local directory hierarchy.  Multiple
 .B -Y
 a given derived file has been built in-place
 or retrieved from the cache.
 
+The
+.BR NoCache ()
+method can be used to disable caching of specific files.  This can be
+useful if inputs and/or outputs of some tool are impossible to
+predict or prohibitively large.
+
 '\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 .TP 
 .RI Clean( targets ", " files_or_dirs )
 	     rename ])
 .EE
 
+.IP
 Note that the
 .BR Command ()
 function will usually assume, by default,
 env.Command(env.Dir('$DISTDIR')), None, make_distdir)
 .EE
 
+.IP
 (Also note that SCons will usually
 automatically create any directory necessary to hold a target file,
 so you normally don't need to create directories by hand.)
 env=Environment()
 print env.Dump('CCCOM')
 .EE
+.IP
 will print:
 .ES
 '$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
 env=Environment()
 print env.Dump()
 .EE
+.IP
 will print:
 .ES
 { 'AR': 'ar',
 
 '\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 .TP
+.RI NoCache( target ", ...)"
+.TP
+.RI env.NoCache( target ", ...)"
+Specifies a list of files which should
+.I not
+be cached whenever the 
+.BR CacheDir ()
+method has been activated.
+The specified targets may be a list
+or an individual target.
+Multiple calls to
+.BR NoCache ()
+are legal,
+and prevent each specified target
+from being removed by calls to the
+.B -c
+option.
+
+Multiple files should be specified
+either as separate arguments to the
+.BR NoCache ()
+method, or as a list.
+.BR NoCache ()
+will also accept the return value of any of the construction environment
+Builder methods.
+
+Calling
+.BR NoCache ()
+on directories and other non-File Node types has no effect because
+only File Nodes are cached.
+
+Examples:
+
+.ES
+NoCache('foo.elf')
+NoCache(env.Program('hello', 'hello.c'))
+.EE
+
+'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.TP
 .RI NoClean( target ", ...)"
 .TP
 .RI env.NoClean( target ", ...)"
 +                   CCFLAGS, LINKFLAGS
 .EE
 
+.IP
 Any other strings not associated with options
 are assumed to be the names of libraries
 and added to the
 which verifies that the specified path is an existing file;
 .BR PathOption.PathIsDir ,
 which verifies that the specified path is an existing directory;
+.BR PathOption.PathIsDirCreate ,
+which verifies that the specified path is a directory
+and will create the specified directory if the path does not exist;
 and
-.BR PathOption.PathIsDirCreate ,
-which verifies that the specified path is a directory,
-and will create the specified directory if the path does not exist.
+.BR PathOption.PathAccept ,
+which simply accepts the specific path name argument without validation,
+and which is suitable if you want your users
+to be able to specify a directory path that will be
+created as part of the build process, for example.
 You may supply your own
 .I validator
 function,
 env.MakeDirectory('new_directory', [])
 .EE
 
+.IP
 Note that the call to the MakeDirectory Builder
 needs to specify an empty source list
 to make the string represent the builder's target;
 Scanner accepts the following arguments:
 
 .IP function
-A Python function that will process
+This can be either:
+1) a Python function that will process
 the Node (file)
 and return a list of strings (file names)
 representing the implicit
-dependencies found in the contents.
-The function takes three or four arguments:
+dependencies found in the contents;
+or:
+2) a dictionary that maps keys
+(typically the file suffix, but see below for more discussion)
+to other Scanners that should be called.
+
+If the argument is actually a Python function,
+the function must take three or four arguments:
 
     def scanner_function(node, env, path):
 
-    def scanner_function(node, env, path, arg):
+    def scanner_function(node, env, path, arg=None):
 
 The
 .B node

doc/user/ENV.sgml

     on a POSIX system
     is <literal>/usr/local/bin:/bin:/usr/bin</literal>.
     The default value of the &PATH; environment variable
-    on a Win32 system comes from the Windows registry
+    on a Windows system comes from the Windows registry
     value for the command interpreter.
     If you want to execute any commands--compilers, linkers, etc.--that
     are not in these default locations,

doc/user/alias.sgml

 
   <screen>
      % <userinput>scons -Q install</userinput>
-     cc -c -o hello.o hello.c
+     cc -o hello.o -c hello.c
      cc -o hello hello.o
      Install file: "hello" as "/usr/bin/hello"
   </screen>
 
   <screen>
      % <userinput>scons -Q install-bin</userinput>
-     cc -c -o foo.o foo.c
+     cc -o foo.o -c foo.c
      cc -o foo foo.o
      Install file: "foo" as "/usr/bin/foo"
      % <userinput>scons -Q install-lib</userinput>
-     cc -c -o bar.o bar.c
-     ar r libbar.a bar.o
+     cc -o bar.o -c bar.c
+     ar rc libbar.a bar.o
      ranlib libbar.a
      Install file: "libbar.a" as "/usr/lib/libbar.a"
      % <userinput>scons -Q -c /</userinput>
      Removed libbar.a
      Removed /usr/lib/libbar.a
      % <userinput>scons -Q install</userinput>
-     cc -c -o foo.o foo.c
+     cc -o foo.o -c foo.c
      cc -o foo foo.o
      Install file: "foo" as "/usr/bin/foo"
-     cc -c -o bar.o bar.c
-     ar r libbar.a bar.o
+     cc -o bar.o -c bar.c
+     ar rc libbar.a bar.o
      ranlib libbar.a
      Install file: "libbar.a" as "/usr/lib/libbar.a"
   </screen>

doc/user/builders-built-in.sgml

 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -c -o goodbye.o goodbye.c
-      cc -c -o hello.o hello.c
+      cc -o goodbye.o -c goodbye.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o goodbye.o -L/usr/dir1 -Ldir2 -lfoo1 -lfoo2
     </screen>
 

doc/user/builders-writing.sgml

     <screen>
       % <userinput>scons -Q</userinput>
       foobuild &lt; file.input &gt; file.foo
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
     </screen>
 

doc/user/caching.sgml

 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
       % <userinput>scons -Q -c</userinput>
       Removed hello.o
 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
       % <userinput>scons -Q -c</userinput>
       Removed hello.o
       Removed hello
       % <userinput>scons -Q --cache-show</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
     </screen>
 
 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
       % <userinput>scons -Q -c</userinput>
       Removed hello.o
       Removed hello.o
       Removed hello
       % <userinput>scons -Q --cache-disable</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
     </screen>
 
 
     <screen>
       % <userinput>scons -Q --cache-disable</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
       % <userinput>scons -Q -c</userinput>
       Removed hello.o
       Removed hello
       % <userinput>scons -Q --cache-disable</userinput>
-      cc -c -o hello.o hello.c
+      cc -o hello.o -c hello.c
       cc -o hello hello.o
       % <userinput>scons -Q --cache-force</userinput>
       scons: `.' is up to date.

doc/user/command-line.sgml

 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -c -o foo.o foo.c
+      cc -o foo.o -c foo.c
       cc -o foo foo.o
       % <userinput>scons -Q bar</userinput>
       Don't forget to copy `bar' to the archive!
-      cc -c -o bar.o bar.c
+      cc -o bar.o -c bar.c
       cc -o bar bar.o
     </screen>
 
 
     <screen>
        % <userinput>scons -Q</userinput>
-       cc -c -o hello.o hello.c
+       cc -o hello.o -c hello.c
        cc -o hello hello.o
        % <userinput>scons -Q</userinput>
        scons: `hello' is up to date.
        % <userinput>scons -Q goodbye</userinput>
-       cc -c -o goodbye.o goodbye.c
+       cc -o goodbye.o -c goodbye.c
        cc -o goodbye goodbye.o
     </screen>
 
 
     <screen>
        % <userinput>scons -Q .</userinput>
-       cc -c -o goodbye.o goodbye.c
+       cc -o goodbye.o -c goodbye.c
        cc -o goodbye goodbye.o
-       cc -c -o hello.o hello.c
+       cc -o hello.o -c hello.c
        cc -o hello hello.o
     </screen>
 
 
     <screen>
        % <userinput>scons -Q</userinput>
-       cc -c -o prog1.o prog1.c
+       cc -o prog1.o -c prog1.c
        cc -o prog1 prog1.o
-       cc -c -o prog3.o prog3.c
+       cc -o prog3.o -c prog3.c
        cc -o prog3 prog3.o
        % <userinput>scons -Q .</userinput>
-       cc -c -o prog2.o prog2.c
+       cc -o prog2.o -c prog2.c
        cc -o prog2 prog2.o
     </screen>
 
 
     <screen>
        % <userinput>scons -Q</userinput>
-       cc -c -o prog1/foo.o prog1/foo.c
-       cc -c -o prog1/main.o prog1/main.c
+       cc -o prog1/foo.o -c prog1/foo.c
+       cc -o prog1/main.o -c prog1/main.c
        cc -o prog1/main prog1/main.o prog1/foo.o
        % <userinput>scons -Q</userinput>
        scons: `prog1' is up to date.
        % <userinput>scons -Q .</userinput>
-       cc -c -o prog2/bar.o prog2/bar.c
-       cc -c -o prog2/main.o prog2/main.c
+       cc -o prog2/bar.o -c prog2/bar.c
+       cc -o prog2/main.o -c prog2/main.c
        cc -o prog2/main prog2/main.o prog2/bar.o
     </screen>
 
        % <userinput>scons -Q</userinput>
        scons: *** No targets specified and no Default() targets found.  Stop.
        % <userinput>scons -Q .</userinput>
-       cc -c -o prog1.o prog1.c
+       cc -o prog1.o -c prog1.c
        cc -o prog1 prog1.o
-       cc -c -o prog2.o prog2.c
+       cc -o prog2.o -c prog2.c
        cc -o prog2 prog2.o
     </screen>
 
          DEFAULT_TARGETS is ['prog1']
          scons: done reading SConscript files.
          scons: Building targets ...
-         cc -c -o prog1.o prog1.c
+         cc -o prog1.o -c prog1.c
          cc -o prog1 prog1.o
          scons: done building targets.
       </screen>
          DEFAULT_TARGETS is now ['prog1', 'prog2']
          scons: done reading SConscript files.
          scons: Building targets ...
-         cc -c -o prog1.o prog1.c
+         cc -o prog1.o -c prog1.c
          cc -o prog1 prog1.o
-         cc -c -o prog2.o prog2.c
+         cc -o prog2.o -c prog2.c
          cc -o prog2 prog2.o
          scons: done building targets.
       </screen>
     <screen>
       % <userinput>scons -Q</userinput>
       BUILD_TARGETS is ['prog1']
-      cc -c -o prog1.o prog1.c
+      cc -o prog1.o -c prog1.c
       cc -o prog1 prog1.o
       % <userinput>scons -Q prog2</userinput>
       BUILD_TARGETS is ['prog2']
-      cc -c -o prog2.o prog2.c
+      cc -o prog2.o -c prog2.c
       cc -o prog2 prog2.o
       % <userinput>scons -Q -c .</userinput>
       BUILD_TARGETS is ['.']
 
     <screen>
        % <userinput>scons -Q debug=0</userinput>
-       cc -c -o prog.o prog.c
+       cc -o prog.o -c prog.c
        cc -o prog prog.o
        % <userinput>scons -Q debug=0</userinput>
        scons: `.' is up to date.
        % <userinput>scons -Q debug=1</userinput>
-       cc -g -c -o prog.o prog.c
+       cc -o prog.o -c -g prog.c
        cc -o prog prog.o
        % <userinput>scons -Q debug=1</userinput>
        scons: `.' is up to date.
 
     <screen>
       % <userinput>scons -Q RELEASE=1</userinput>
-      cc -DRELEASE_BUILD=1 -c -o bar.o bar.c
-      cc -DRELEASE_BUILD=1 -c -o foo.o foo.c
+      cc -o bar.o -c -DRELEASE_BUILD=1 bar.c
+      cc -o foo.o -c -DRELEASE_BUILD=1 foo.c
       cc -o foo foo.o bar.o
     </screen>
 
 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -DRELEASE_BUILD=1 -c -o bar.o bar.c
-      cc -DRELEASE_BUILD=1 -c -o foo.o foo.c
+      cc -o bar.o -c -D['RELEASE_BUILD=', 1] bar.c
+      cc -o foo.o -c -D['RELEASE_BUILD=', 1] foo.c
       cc -o foo foo.o bar.o
     </screen>
 
 
     <screen>
       % <userinput>scons -Q</userinput>
-      cc -DRELEASE_BUILD=0 -c -o bar.o bar.c
-      cc -DRELEASE_BUILD=0 -c -o foo.o foo.c
+      cc -o bar.o -c -D['RELEASE_BUILD=', 0] bar.c
+      cc -o foo.o -c -D['RELEASE_BUILD=', 0] foo.c
       cc -o foo foo.o bar.o
     </screen>
 
 
       <screen>
         % <userinput>scons -Q RELEASE=yes foo.o</userinput>
-        cc -DRELEASE_BUILD=1 -c -o foo.o foo.c
+        cc -o foo.o -c -D['RELEASE_BUILD=', True] foo.c
       </screen>
 
       <screen>
         % <userinput>scons -Q RELEASE=t foo.o</userinput>
-        cc -DRELEASE_BUILD=1 -c -o foo.o foo.c
+        cc -o foo.o -c -D['RELEASE_BUILD=', True] foo.c
       </screen>
 
       <para>
 
       <screen>
         % <userinput>scons -Q RELEASE=no foo.o</userinput>
-        cc -DRELEASE_BUILD=0 -c -o foo.o foo.c
+        cc -o foo.o -c -D['RELEASE_BUILD=', False] foo.c
       </screen>
 
       <screen>
         % <userinput>scons -Q RELEASE=f foo.o</userinput>
-        cc -DRELEASE_BUILD=0 -c -o foo.o foo.c
+        cc -o foo.o -c -D['RELEASE_BUILD=', False] foo.c
       </screen>
 
       <para>
         
         scons: *** Error converting option: RELEASE
         Invalid value for boolean option: bad_value
-        File "SConstruct", line 4, in ?
+        File "/home/my/project/SConstruct", line 4, in ?
       </screen>
 
     </section>
 
       <screen>
         % <userinput>scons -Q COLOR=red foo.o</userinput>
-        cc -DCOLOR="red" -c -o foo.o foo.c
+        cc -o foo.o -c -DCOLOR="red" foo.c
         % <userinput>scons -Q COLOR=blue foo.o</userinput>
-        cc -DCOLOR="blue" -c -o foo.o foo.c
+        cc -o foo.o -c -DCOLOR="blue" foo.c
         % <userinput>scons -Q COLOR=green foo.o</userinput>
-        cc -DCOLOR="green" -c -o foo.o foo.c
+        cc -o foo.o -c -DCOLOR="green" foo.c
       </screen>
 
       <para>
         % <userinput>scons -Q COLOR=magenta foo.o</userinput>
         
         scons: *** Invalid value for option COLOR: magenta
-        File "SConstruct", line 5, in ?
+        File "/home/my/project/SConstruct", line 5, in ?
       </screen>
 
       <para>
 
       <screen>
         % <userinput>scons -Q COLOR=navy foo.o</userinput>
-        cc -DCOLOR="blue" -c -o foo.o foo.c
+        cc -o foo.o -c -DCOLOR="blue" foo.c
       </screen>
 
       <para>
         % <userinput>scons -Q COLOR=Red foo.o</userinput>
         
         scons: *** Invalid value for option COLOR: Red
-        File "SConstruct", line 5, in ?
+        File "/home/my/project/SConstruct", line 5, in ?
         % <userinput>scons -Q COLOR=BLUE foo.o</userinput>