summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 00:31:29 +0000
committerbradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 00:31:29 +0000
commit282e2f7d5da27717e6fe05abd482237db0019e01 (patch)
tree6cc7563bc98506f67c1a0b2fc2b6113cdd1c9dfe
parentc91a523e35cbbf233f82ae17a340b92459da5103 (diff)
downloadchromium_src-282e2f7d5da27717e6fe05abd482237db0019e01.zip
chromium_src-282e2f7d5da27717e6fe05abd482237db0019e01.tar.gz
chromium_src-282e2f7d5da27717e6fe05abd482237db0019e01.tar.bz2
Moving to scons 1.1.0
Review URL: http://codereview.chromium.org/8900 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4197 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--third_party/scons/scons-local/SCons/Action.py10
-rw-r--r--third_party/scons/scons-local/SCons/Builder.py4
-rw-r--r--third_party/scons/scons-local/SCons/CacheDir.py2
-rw-r--r--third_party/scons/scons-local/SCons/Debug.py2
-rw-r--r--third_party/scons/scons-local/SCons/Defaults.py2
-rw-r--r--third_party/scons/scons-local/SCons/Environment.py98
-rw-r--r--third_party/scons/scons-local/SCons/Errors.py2
-rw-r--r--third_party/scons/scons-local/SCons/Executor.py2
-rw-r--r--third_party/scons/scons-local/SCons/Job.py2
-rw-r--r--third_party/scons/scons-local/SCons/Memoize.py2
-rw-r--r--third_party/scons/scons-local/SCons/Node/Alias.py2
-rw-r--r--third_party/scons/scons-local/SCons/Node/FS.py34
-rw-r--r--third_party/scons/scons-local/SCons/Node/Python.py2
-rw-r--r--third_party/scons/scons-local/SCons/Node/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/Options/BoolOption.py2
-rw-r--r--third_party/scons/scons-local/SCons/Options/EnumOption.py2
-rw-r--r--third_party/scons/scons-local/SCons/Options/ListOption.py2
-rw-r--r--third_party/scons/scons-local/SCons/Options/PackageOption.py2
-rw-r--r--third_party/scons/scons-local/SCons/Options/PathOption.py2
-rw-r--r--third_party/scons/scons-local/SCons/Options/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/PathList.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/aix.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/cygwin.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/darwin.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/hpux.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/irix.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/os2.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/posix.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/sunos.py2
-rw-r--r--third_party/scons/scons-local/SCons/Platform/win32.py2
-rw-r--r--third_party/scons/scons-local/SCons/SConf.py2
-rw-r--r--third_party/scons/scons-local/SCons/SConsign.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/C.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/D.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/Dir.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/Fortran.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/IDL.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/LaTeX.py210
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/Prog.py2
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/RC.py49
-rw-r--r--third_party/scons/scons-local/SCons/Scanner/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/Script/Interactive.py2
-rw-r--r--third_party/scons/scons-local/SCons/Script/Main.py5
-rw-r--r--third_party/scons/scons-local/SCons/Script/SConsOptions.py15
-rw-r--r--third_party/scons/scons-local/SCons/Script/SConscript.py2
-rw-r--r--third_party/scons/scons-local/SCons/Script/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/Sig.py2
-rw-r--r--third_party/scons/scons-local/SCons/Subst.py15
-rw-r--r--third_party/scons/scons-local/SCons/Taskmaster.py6
-rw-r--r--third_party/scons/scons-local/SCons/Tool/386asm.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/BitKeeper.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/CVS.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/FortranCommon.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/JavaCommon.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/Perforce.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/PharLapCommon.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/RCS.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/SCCS.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/Subversion.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/__init__.py10
-rw-r--r--third_party/scons/scons-local/SCons/Tool/aixc++.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/aixcc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/aixf77.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/aixlink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/applelink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/ar.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/as.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/bcc32.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/c++.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/cc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/cvf.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/default.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/dmd.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/dvi.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/dvipdf.py49
-rw-r--r--third_party/scons/scons-local/SCons/Tool/dvips.py21
-rw-r--r--third_party/scons/scons-local/SCons/Tool/f77.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/f90.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/f95.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/filesystem.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/fortran.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/g++.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/g77.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/gas.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/gcc.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/gfortran.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/gnulink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/gs.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/hpc++.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/hpcc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/hplink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/icc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/icl.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/ifl.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/ifort.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/ilink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/ilink32.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/install.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/intelc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/jar.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/javac.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/javah.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/latex.py5
-rw-r--r--third_party/scons/scons-local/SCons/Tool/lex.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/link.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/linkloc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/m4.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/masm.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/midl.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/mingw.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/mslib.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/mslink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/msvc.py14
-rw-r--r--third_party/scons/scons-local/SCons/Tool/msvs.py55
-rw-r--r--third_party/scons/scons-local/SCons/Tool/mwcc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/mwld.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/nasm.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/ipk.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/msi.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/rpm.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/src_tarbz2.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/src_targz.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/src_zip.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/targz.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/packaging/zip.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/pdf.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/pdflatex.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/pdftex.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/qt.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/rmic.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/rpcgen.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/rpm.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sgiar.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sgic++.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sgicc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sgilink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sunar.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sunc++.py4
-rw-r--r--third_party/scons/scons-local/SCons/Tool/suncc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sunf77.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sunf90.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sunf95.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/sunlink.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/swig.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/tar.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/tex.py467
-rw-r--r--third_party/scons/scons-local/SCons/Tool/tlib.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/wix.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/yacc.py2
-rw-r--r--third_party/scons/scons-local/SCons/Tool/zip.py2
-rw-r--r--third_party/scons/scons-local/SCons/Util.py123
-rw-r--r--third_party/scons/scons-local/SCons/Variables/BoolVariable.py2
-rw-r--r--third_party/scons/scons-local/SCons/Variables/EnumVariable.py2
-rw-r--r--third_party/scons/scons-local/SCons/Variables/ListVariable.py2
-rw-r--r--third_party/scons/scons-local/SCons/Variables/PackageVariable.py2
-rw-r--r--third_party/scons/scons-local/SCons/Variables/PathVariable.py2
-rw-r--r--third_party/scons/scons-local/SCons/Variables/__init__.py2
-rw-r--r--third_party/scons/scons-local/SCons/Warnings.py2
-rw-r--r--third_party/scons/scons-local/SCons/__init__.py8
-rw-r--r--third_party/scons/scons-local/SCons/compat/__init__.py42
-rw-r--r--third_party/scons/scons-local/SCons/compat/_scons_UserString.py2
-rw-r--r--third_party/scons/scons-local/SCons/compat/_scons_hashlib.py2
-rw-r--r--third_party/scons/scons-local/SCons/compat/_scons_itertools.py2
-rw-r--r--third_party/scons/scons-local/SCons/compat/builtins.py8
-rw-r--r--third_party/scons/scons-local/SCons/cpp.py7
-rw-r--r--third_party/scons/scons-local/SCons/exitfuncs.py2
-rw-r--r--third_party/scons/scons-time.py2
-rwxr-xr-xthird_party/scons/scons.py8
-rw-r--r--third_party/scons/sconsign.py8
172 files changed, 1138 insertions, 443 deletions
diff --git a/third_party/scons/scons-local/SCons/Action.py b/third_party/scons/scons-local/SCons/Action.py
index bd89470..bfd7a7d 100644
--- a/third_party/scons/scons-local/SCons/Action.py
+++ b/third_party/scons/scons-local/SCons/Action.py
@@ -95,7 +95,7 @@ way for wrapping up the functions.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Action.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Action.py 3603 2008/10/10 05:46:45 scons"
import cPickle
import dis
@@ -518,7 +518,9 @@ def _subproc(env, cmd, error = 'ignore', **kw):
is_String = SCons.Util.is_String
for key, value in ENV.items():
if is_String(value):
- new_env[key] = value
+ # Call str() even though it's a "string" because it might be
+ # a *Unicode* string, which makes subprocess.Popen() gag.
+ new_env[key] = str(value)
elif SCons.Util.is_List(value):
# If the value is a list, then we assume it is a
# path list, because that's a pretty common list-like
@@ -541,8 +543,8 @@ def _subproc(env, cmd, error = 'ignore', **kw):
# return a dummy Popen instance that only returns error
class popen:
def __init__(self, e): self.exception = e
- def communicate(): return ('','')
- def wait(): return -self.exception.errno
+ def communicate(self): return ('','')
+ def wait(self): return -self.exception.errno
stdin = None
class f:
def read(self): return ''
diff --git a/third_party/scons/scons-local/SCons/Builder.py b/third_party/scons/scons-local/SCons/Builder.py
index 8959fc0..141d9d9 100644
--- a/third_party/scons/scons-local/SCons/Builder.py
+++ b/third_party/scons/scons-local/SCons/Builder.py
@@ -98,7 +98,7 @@ There are the following methods for internal use within this module:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Builder.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Builder.py 3603 2008/10/10 05:46:45 scons"
import UserDict
import UserList
@@ -505,7 +505,7 @@ class BuilderBase:
tlist = [ t_from_s(pre, suf, splitext) ]
else:
target = self._adjustixes(target, pre, suf, self.ensure_suffix)
- tlist = env.arg2nodes(target, target_factory)
+ tlist = env.arg2nodes(target, target_factory, target=target, source=source)
if self.emitter:
# The emitter is going to do str(node), but because we're
diff --git a/third_party/scons/scons-local/SCons/CacheDir.py b/third_party/scons/scons-local/SCons/CacheDir.py
index 499e6a9..24c8d69 100644
--- a/third_party/scons/scons-local/SCons/CacheDir.py
+++ b/third_party/scons/scons-local/SCons/CacheDir.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/CacheDir.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/CacheDir.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """
CacheDir support
diff --git a/third_party/scons/scons-local/SCons/Debug.py b/third_party/scons/scons-local/SCons/Debug.py
index 2df6117..e1eb7ef 100644
--- a/third_party/scons/scons-local/SCons/Debug.py
+++ b/third_party/scons/scons-local/SCons/Debug.py
@@ -29,7 +29,7 @@ needed by most users.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Debug.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Debug.py 3603 2008/10/10 05:46:45 scons"
import os
import string
diff --git a/third_party/scons/scons-local/SCons/Defaults.py b/third_party/scons/scons-local/SCons/Defaults.py
index e60db2f..9967374 100644
--- a/third_party/scons/scons-local/SCons/Defaults.py
+++ b/third_party/scons/scons-local/SCons/Defaults.py
@@ -32,7 +32,7 @@ from distutils.msvccompiler.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Defaults.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Defaults.py 3603 2008/10/10 05:46:45 scons"
diff --git a/third_party/scons/scons-local/SCons/Environment.py b/third_party/scons/scons-local/SCons/Environment.py
index 61dbfc9..a08dce0 100644
--- a/third_party/scons/scons-local/SCons/Environment.py
+++ b/third_party/scons/scons-local/SCons/Environment.py
@@ -32,12 +32,12 @@ Environment
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Environment.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Environment.py 3603 2008/10/10 05:46:45 scons"
import copy
import os
-import os.path
+import sys
import re
import shlex
import string
@@ -535,15 +535,11 @@ class SubstitutionEnvironment:
# othewise force a shell
if not SCons.Util.is_List(command): kw['shell'] = True
# run constructed command
- #FUTURE p = SCons.Action._subproc(self, command, **kw)
+ #TODO(1.5) p = SCons.Action._subproc(self, command, **kw)
p = apply(SCons.Action._subproc, (self, command), kw)
- out = p.stdout.read()
- p.stdout.close()
- err = p.stderr.read()
- p.stderr.close()
+ out,err = p.communicate()
status = p.wait()
if err:
- import sys
sys.stderr.write(err)
if status:
raise OSError("'%s' exited %d" % (command, status))
@@ -747,13 +743,16 @@ class SubstitutionEnvironment:
do_parse(arg, do_parse)
return dict
- def MergeFlags(self, args, unique=1):
+ def MergeFlags(self, args, unique=1, dict=None):
"""
- Merge the dict in args into the construction variables. If args
- is not a dict, it is converted into a dict using ParseFlags.
- If unique is not set, the flags are appended rather than merged.
+ Merge the dict in args into the construction variables of this
+ env, or the passed-in dict. If args is not a dict, it is
+ converted into a dict using ParseFlags. If unique is not set,
+ the flags are appended rather than merged.
"""
+ if dict is None:
+ dict = self
if not SCons.Util.is_Dict(args):
args = self.ParseFlags(args)
if not unique:
@@ -801,6 +800,26 @@ class SubstitutionEnvironment:
self[key] = t
return self
+# def MergeShellPaths(self, args, prepend=1):
+# """
+# Merge the dict in args into the shell environment in env['ENV'].
+# Shell path elements are appended or prepended according to prepend.
+
+# Uses Pre/AppendENVPath, so it always appends or prepends uniquely.
+
+# Example: env.MergeShellPaths({'LIBPATH': '/usr/local/lib'})
+# prepends /usr/local/lib to env['ENV']['LIBPATH'].
+# """
+
+# for pathname, pathval in args.items():
+# if not pathval:
+# continue
+# if prepend:
+# apply(self.PrependENVPath, (pathname, pathval))
+# else:
+# apply(self.AppendENVPath, (pathname, pathval))
+
+
# Used by the FindSourceFiles() method, below.
# Stuck here for support of pre-2.2 Python versions.
def build_source(ss, result):
@@ -1139,28 +1158,34 @@ class Base(SubstitutionEnvironment):
orig[val] = None
self.scanner_map_delete(kw)
- def AppendENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep):
+ def AppendENVPath(self, name, newpath, envname = 'ENV',
+ sep = os.pathsep, delete_existing=1):
"""Append path elements to the path 'name' in the 'ENV'
dictionary for this environment. Will only add any particular
path once, and will normpath and normcase all paths to help
assure this. This can also handle the case where the env
variable is a list instead of a string.
+
+ If delete_existing is 0, a newpath which is already in the path
+ will not be moved to the end (it will be left where it is).
"""
orig = ''
if self._dict.has_key(envname) and self._dict[envname].has_key(name):
orig = self._dict[envname][name]
- nv = SCons.Util.AppendPath(orig, newpath, sep)
+ nv = SCons.Util.AppendPath(orig, newpath, sep, delete_existing)
if not self._dict.has_key(envname):
self._dict[envname] = {}
self._dict[envname][name] = nv
- def AppendUnique(self, **kw):
+ def AppendUnique(self, delete_existing=0, **kw):
"""Append values to existing construction variables
in an Environment, if they're not already there.
+ If delete_existing is 1, removes existing values first, so
+ values move to end.
"""
kw = copy_non_reserved_keywords(kw)
for key, val in kw.items():
@@ -1173,17 +1198,26 @@ class Base(SubstitutionEnvironment):
dk = self._dict[key]
if not SCons.Util.is_List(dk):
dk = [dk]
- val = filter(lambda x, dk=dk: x not in dk, val)
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ else:
+ val = filter(lambda x, dk=dk: x not in dk, val)
self._dict[key] = dk + val
else:
dk = self._dict[key]
if SCons.Util.is_List(dk):
# By elimination, val is not a list. Since dk is a
# list, wrap val in a list first.
- if not val in dk:
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
self._dict[key] = dk + [val]
+ else:
+ if not val in dk:
+ self._dict[key] = dk + [val]
else:
- self._dict[key] = self._dict[key] + val
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ self._dict[key] = dk + val
self.scanner_map_delete(kw)
def Clone(self, tools=[], toolpath=None, parse_flags = None, **kw):
@@ -1477,28 +1511,34 @@ class Base(SubstitutionEnvironment):
orig[val] = None
self.scanner_map_delete(kw)
- def PrependENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep):
+ def PrependENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep,
+ delete_existing=1):
"""Prepend path elements to the path 'name' in the 'ENV'
dictionary for this environment. Will only add any particular
path once, and will normpath and normcase all paths to help
assure this. This can also handle the case where the env
variable is a list instead of a string.
+
+ If delete_existing is 0, a newpath which is already in the path
+ will not be moved to the front (it will be left where it is).
"""
orig = ''
if self._dict.has_key(envname) and self._dict[envname].has_key(name):
orig = self._dict[envname][name]
- nv = SCons.Util.PrependPath(orig, newpath, sep)
+ nv = SCons.Util.PrependPath(orig, newpath, sep, delete_existing)
if not self._dict.has_key(envname):
self._dict[envname] = {}
self._dict[envname][name] = nv
- def PrependUnique(self, **kw):
- """Append values to existing construction variables
+ def PrependUnique(self, delete_existing=0, **kw):
+ """Prepend values to existing construction variables
in an Environment, if they're not already there.
+ If delete_existing is 1, removes existing values first, so
+ values move to front.
"""
kw = copy_non_reserved_keywords(kw)
for key, val in kw.items():
@@ -1511,16 +1551,25 @@ class Base(SubstitutionEnvironment):
dk = self._dict[key]
if not SCons.Util.is_List(dk):
dk = [dk]
- val = filter(lambda x, dk=dk: x not in dk, val)
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ else:
+ val = filter(lambda x, dk=dk: x not in dk, val)
self._dict[key] = val + dk
else:
dk = self._dict[key]
if SCons.Util.is_List(dk):
# By elimination, val is not a list. Since dk is a
# list, wrap val in a list first.
- if not val in dk:
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
self._dict[key] = [val] + dk
+ else:
+ if not val in dk:
+ self._dict[key] = [val] + dk
else:
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
self._dict[key] = val + dk
self.scanner_map_delete(kw)
@@ -1816,7 +1865,6 @@ class Base(SubstitutionEnvironment):
errstr = result.errstr
if result.filename:
errstr = result.filename + ': ' + errstr
- import sys
sys.stderr.write("scons: *** %s\n" % errstr)
return result.status
else:
diff --git a/third_party/scons/scons-local/SCons/Errors.py b/third_party/scons/scons-local/SCons/Errors.py
index 501e45b..74973dd 100644
--- a/third_party/scons/scons-local/SCons/Errors.py
+++ b/third_party/scons/scons-local/SCons/Errors.py
@@ -28,7 +28,7 @@ and user errors in SCons.
"""
-__revision__ = "src/engine/SCons/Errors.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Errors.py 3603 2008/10/10 05:46:45 scons"
diff --git a/third_party/scons/scons-local/SCons/Executor.py b/third_party/scons/scons-local/SCons/Executor.py
index b64e4ca..43f02b2 100644
--- a/third_party/scons/scons-local/SCons/Executor.py
+++ b/third_party/scons/scons-local/SCons/Executor.py
@@ -28,7 +28,7 @@ Nodes.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Executor.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Executor.py 3603 2008/10/10 05:46:45 scons"
import string
diff --git a/third_party/scons/scons-local/SCons/Job.py b/third_party/scons/scons-local/SCons/Job.py
index 9b7f80b..7e067a0 100644
--- a/third_party/scons/scons-local/SCons/Job.py
+++ b/third_party/scons/scons-local/SCons/Job.py
@@ -29,7 +29,7 @@ stop, and wait on jobs.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Job.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Job.py 3603 2008/10/10 05:46:45 scons"
import os
import signal
diff --git a/third_party/scons/scons-local/SCons/Memoize.py b/third_party/scons/scons-local/SCons/Memoize.py
index 1bf012b..6a234fd 100644
--- a/third_party/scons/scons-local/SCons/Memoize.py
+++ b/third_party/scons/scons-local/SCons/Memoize.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Memoize.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Memoize.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Memoizer
diff --git a/third_party/scons/scons-local/SCons/Node/Alias.py b/third_party/scons/scons-local/SCons/Node/Alias.py
index 08268fb..50aecbc 100644
--- a/third_party/scons/scons-local/SCons/Node/Alias.py
+++ b/third_party/scons/scons-local/SCons/Node/Alias.py
@@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets).
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/Alias.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Node/Alias.py 3603 2008/10/10 05:46:45 scons"
import string
import UserDict
diff --git a/third_party/scons/scons-local/SCons/Node/FS.py b/third_party/scons/scons-local/SCons/Node/FS.py
index b02c17a..218542e 100644
--- a/third_party/scons/scons-local/SCons/Node/FS.py
+++ b/third_party/scons/scons-local/SCons/Node/FS.py
@@ -33,7 +33,7 @@ that can be used by scripts or modules looking for the canonical default.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/FS.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Node/FS.py 3603 2008/10/10 05:46:45 scons"
import fnmatch
from itertools import izip
@@ -2160,6 +2160,8 @@ class File(Base):
NodeInfo = FileNodeInfo
BuildInfo = FileBuildInfo
+ md5_chunksize = 64
+
def diskcheck_match(self):
diskcheck_match(self, self.isdir,
"Directory %s found where file expected.")
@@ -2233,6 +2235,23 @@ class File(Base):
raise
return r
+ def get_content_hash(self):
+ """
+ Compute and return the MD5 hash for this file.
+ """
+ if not self.rexists():
+ return SCons.Util.MD5signature('')
+ fname = self.rfile().abspath
+ try:
+ cs = SCons.Util.MD5filesignature(fname,
+ chunksize=SCons.Node.FS.File.md5_chunksize*1024)
+ except EnvironmentError, e:
+ if not e.filename:
+ e.filename = fname
+ raise
+ return cs
+
+
memoizer_counters.append(SCons.Memoize.CountValue('get_size'))
def get_size(self):
@@ -2697,7 +2716,10 @@ class File(Base):
if csig is None:
try:
- contents = self.get_contents()
+ if self.get_size() < SCons.Node.FS.File.md5_chunksize:
+ contents = self.get_contents()
+ else:
+ csig = self.get_content_hash()
except IOError:
# This can happen if there's actually a directory on-disk,
# which can be the case if they've disabled disk checks,
@@ -2705,7 +2727,8 @@ class File(Base):
# create a same-named directory by mistake.
csig = ''
else:
- csig = SCons.Util.MD5signature(contents)
+ if not csig:
+ csig = SCons.Util.MD5signature(contents)
ninfo.csig = csig
@@ -2833,8 +2856,8 @@ class File(Base):
cachedir, cachefile = self.get_build_env().get_CacheDir().cachepath(self)
if not self.exists() and cachefile and os.path.exists(cachefile):
- contents = open(cachefile, 'rb').read()
- self.cachedir_csig = SCons.Util.MD5signature(contents)
+ self.cachedir_csig = SCons.Util.MD5filesignature(cachefile, \
+ SCons.Node.FS.File.md5_chunksize * 1024)
else:
self.cachedir_csig = self.get_csig()
return self.cachedir_csig
@@ -2856,6 +2879,7 @@ class File(Base):
self.cachesig = SCons.Util.MD5collect(sigs)
return self.cachesig
+
default_fs = None
def get_default_fs():
diff --git a/third_party/scons/scons-local/SCons/Node/Python.py b/third_party/scons/scons-local/SCons/Node/Python.py
index e89dfa0..36388ae 100644
--- a/third_party/scons/scons-local/SCons/Node/Python.py
+++ b/third_party/scons/scons-local/SCons/Node/Python.py
@@ -27,7 +27,7 @@ Python nodes.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/Python.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Node/Python.py 3603 2008/10/10 05:46:45 scons"
import SCons.Node
diff --git a/third_party/scons/scons-local/SCons/Node/__init__.py b/third_party/scons/scons-local/SCons/Node/__init__.py
index f234002..322a18d 100644
--- a/third_party/scons/scons-local/SCons/Node/__init__.py
+++ b/third_party/scons/scons-local/SCons/Node/__init__.py
@@ -42,7 +42,7 @@ be able to depend on any other type of "thing."
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Node/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Node/__init__.py 3603 2008/10/10 05:46:45 scons"
import copy
from itertools import chain, izip
diff --git a/third_party/scons/scons-local/SCons/Options/BoolOption.py b/third_party/scons/scons-local/SCons/Options/BoolOption.py
index fa9e0d1..893030f 100644
--- a/third_party/scons/scons-local/SCons/Options/BoolOption.py
+++ b/third_party/scons/scons-local/SCons/Options/BoolOption.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/BoolOption.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Options/BoolOption.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/third_party/scons/scons-local/SCons/Options/EnumOption.py b/third_party/scons/scons-local/SCons/Options/EnumOption.py
index d91e3e7..2d7d032 100644
--- a/third_party/scons/scons-local/SCons/Options/EnumOption.py
+++ b/third_party/scons/scons-local/SCons/Options/EnumOption.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/EnumOption.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Options/EnumOption.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/third_party/scons/scons-local/SCons/Options/ListOption.py b/third_party/scons/scons-local/SCons/Options/ListOption.py
index e635b0c..03fffc2 100644
--- a/third_party/scons/scons-local/SCons/Options/ListOption.py
+++ b/third_party/scons/scons-local/SCons/Options/ListOption.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/ListOption.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Options/ListOption.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/third_party/scons/scons-local/SCons/Options/PackageOption.py b/third_party/scons/scons-local/SCons/Options/PackageOption.py
index 514a5dd..dd143f5 100644
--- a/third_party/scons/scons-local/SCons/Options/PackageOption.py
+++ b/third_party/scons/scons-local/SCons/Options/PackageOption.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/PackageOption.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Options/PackageOption.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/third_party/scons/scons-local/SCons/Options/PathOption.py b/third_party/scons/scons-local/SCons/Options/PathOption.py
index c15b4ec..7c58674 100644
--- a/third_party/scons/scons-local/SCons/Options/PathOption.py
+++ b/third_party/scons/scons-local/SCons/Options/PathOption.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/PathOption.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Options/PathOption.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/third_party/scons/scons-local/SCons/Options/__init__.py b/third_party/scons/scons-local/SCons/Options/__init__.py
index a706b3d..9ba4291 100644
--- a/third_party/scons/scons-local/SCons/Options/__init__.py
+++ b/third_party/scons/scons-local/SCons/Options/__init__.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Options/__init__.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
diff --git a/third_party/scons/scons-local/SCons/PathList.py b/third_party/scons/scons-local/SCons/PathList.py
index 0b6b7c3..5278096 100644
--- a/third_party/scons/scons-local/SCons/PathList.py
+++ b/third_party/scons/scons-local/SCons/PathList.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/PathList.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/PathList.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """SCons.PathList
diff --git a/third_party/scons/scons-local/SCons/Platform/__init__.py b/third_party/scons/scons-local/SCons/Platform/__init__.py
index bf07979..d61f848 100644
--- a/third_party/scons/scons-local/SCons/Platform/__init__.py
+++ b/third_party/scons/scons-local/SCons/Platform/__init__.py
@@ -42,7 +42,7 @@ their own platform definition.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/__init__.py 3603 2008/10/10 05:46:45 scons"
import imp
import os
diff --git a/third_party/scons/scons-local/SCons/Platform/aix.py b/third_party/scons/scons-local/SCons/Platform/aix.py
index 010aba72..7fd8e81 100644
--- a/third_party/scons/scons-local/SCons/Platform/aix.py
+++ b/third_party/scons/scons-local/SCons/Platform/aix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/aix.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/aix.py 3603 2008/10/10 05:46:45 scons"
import os
import string
diff --git a/third_party/scons/scons-local/SCons/Platform/cygwin.py b/third_party/scons/scons-local/SCons/Platform/cygwin.py
index 0f1a351..06448aa 100644
--- a/third_party/scons/scons-local/SCons/Platform/cygwin.py
+++ b/third_party/scons/scons-local/SCons/Platform/cygwin.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/cygwin.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/cygwin.py 3603 2008/10/10 05:46:45 scons"
import posix
from SCons.Platform import TempFileMunge
diff --git a/third_party/scons/scons-local/SCons/Platform/darwin.py b/third_party/scons/scons-local/SCons/Platform/darwin.py
index 76b92a2..84b2711 100644
--- a/third_party/scons/scons-local/SCons/Platform/darwin.py
+++ b/third_party/scons/scons-local/SCons/Platform/darwin.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/darwin.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/darwin.py 3603 2008/10/10 05:46:45 scons"
import posix
diff --git a/third_party/scons/scons-local/SCons/Platform/hpux.py b/third_party/scons/scons-local/SCons/Platform/hpux.py
index 51eed78..b51a885 100644
--- a/third_party/scons/scons-local/SCons/Platform/hpux.py
+++ b/third_party/scons/scons-local/SCons/Platform/hpux.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/hpux.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/hpux.py 3603 2008/10/10 05:46:45 scons"
import posix
diff --git a/third_party/scons/scons-local/SCons/Platform/irix.py b/third_party/scons/scons-local/SCons/Platform/irix.py
index 5038750..c6e3bca 100644
--- a/third_party/scons/scons-local/SCons/Platform/irix.py
+++ b/third_party/scons/scons-local/SCons/Platform/irix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/irix.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/irix.py 3603 2008/10/10 05:46:45 scons"
import posix
diff --git a/third_party/scons/scons-local/SCons/Platform/os2.py b/third_party/scons/scons-local/SCons/Platform/os2.py
index ed70a42..eb7bf74 100644
--- a/third_party/scons/scons-local/SCons/Platform/os2.py
+++ b/third_party/scons/scons-local/SCons/Platform/os2.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/os2.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/os2.py 3603 2008/10/10 05:46:45 scons"
def generate(env):
if not env.has_key('ENV'):
diff --git a/third_party/scons/scons-local/SCons/Platform/posix.py b/third_party/scons/scons-local/SCons/Platform/posix.py
index 2872631..48605ec 100644
--- a/third_party/scons/scons-local/SCons/Platform/posix.py
+++ b/third_party/scons/scons-local/SCons/Platform/posix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/posix.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/posix.py 3603 2008/10/10 05:46:45 scons"
import errno
import os
diff --git a/third_party/scons/scons-local/SCons/Platform/sunos.py b/third_party/scons/scons-local/SCons/Platform/sunos.py
index 8f7cdf0..9edf3aa 100644
--- a/third_party/scons/scons-local/SCons/Platform/sunos.py
+++ b/third_party/scons/scons-local/SCons/Platform/sunos.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/sunos.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/sunos.py 3603 2008/10/10 05:46:45 scons"
import posix
diff --git a/third_party/scons/scons-local/SCons/Platform/win32.py b/third_party/scons/scons-local/SCons/Platform/win32.py
index e365879..333c347 100644
--- a/third_party/scons/scons-local/SCons/Platform/win32.py
+++ b/third_party/scons/scons-local/SCons/Platform/win32.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/win32.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Platform/win32.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/SConf.py b/third_party/scons/scons-local/SCons/SConf.py
index f68304d..1249226 100644
--- a/third_party/scons/scons-local/SCons/SConf.py
+++ b/third_party/scons/scons-local/SCons/SConf.py
@@ -26,7 +26,7 @@ Autoconf-like configuration support.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/SConf.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/SConf.py 3603 2008/10/10 05:46:45 scons"
import os
import re
diff --git a/third_party/scons/scons-local/SCons/SConsign.py b/third_party/scons/scons-local/SCons/SConsign.py
index 352de48..6607f12 100644
--- a/third_party/scons/scons-local/SCons/SConsign.py
+++ b/third_party/scons/scons-local/SCons/SConsign.py
@@ -27,7 +27,7 @@ Writing and reading information to the .sconsign file or files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/SConsign.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/SConsign.py 3603 2008/10/10 05:46:45 scons"
import cPickle
import os
diff --git a/third_party/scons/scons-local/SCons/Scanner/C.py b/third_party/scons/scons-local/SCons/Scanner/C.py
index 08feafe..a097089 100644
--- a/third_party/scons/scons-local/SCons/Scanner/C.py
+++ b/third_party/scons/scons-local/SCons/Scanner/C.py
@@ -27,7 +27,7 @@ This module implements the depenency scanner for C/C++ code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/C.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/C.py 3603 2008/10/10 05:46:45 scons"
import SCons.Node.FS
import SCons.Scanner
diff --git a/third_party/scons/scons-local/SCons/Scanner/D.py b/third_party/scons/scons-local/SCons/Scanner/D.py
index 39a2e01..b997e30 100644
--- a/third_party/scons/scons-local/SCons/Scanner/D.py
+++ b/third_party/scons/scons-local/SCons/Scanner/D.py
@@ -30,7 +30,7 @@ Coded by Andy Friesen
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/D.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/D.py 3603 2008/10/10 05:46:45 scons"
import re
import string
diff --git a/third_party/scons/scons-local/SCons/Scanner/Dir.py b/third_party/scons/scons-local/SCons/Scanner/Dir.py
index 0f62803..dbb282a 100644
--- a/third_party/scons/scons-local/SCons/Scanner/Dir.py
+++ b/third_party/scons/scons-local/SCons/Scanner/Dir.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/Dir.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/Dir.py 3603 2008/10/10 05:46:45 scons"
import SCons.Node.FS
import SCons.Scanner
diff --git a/third_party/scons/scons-local/SCons/Scanner/Fortran.py b/third_party/scons/scons-local/SCons/Scanner/Fortran.py
index 406810f..3d963ca 100644
--- a/third_party/scons/scons-local/SCons/Scanner/Fortran.py
+++ b/third_party/scons/scons-local/SCons/Scanner/Fortran.py
@@ -27,7 +27,7 @@ This module implements the dependency scanner for Fortran code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/Fortran.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/Fortran.py 3603 2008/10/10 05:46:45 scons"
import re
import string
diff --git a/third_party/scons/scons-local/SCons/Scanner/IDL.py b/third_party/scons/scons-local/SCons/Scanner/IDL.py
index 3a3311f..e47a41f 100644
--- a/third_party/scons/scons-local/SCons/Scanner/IDL.py
+++ b/third_party/scons/scons-local/SCons/Scanner/IDL.py
@@ -28,7 +28,7 @@ Definition Language) files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/IDL.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/IDL.py 3603 2008/10/10 05:46:45 scons"
import SCons.Node.FS
import SCons.Scanner
diff --git a/third_party/scons/scons-local/SCons/Scanner/LaTeX.py b/third_party/scons/scons-local/SCons/Scanner/LaTeX.py
index 0542d05..fefeb14 100644
--- a/third_party/scons/scons-local/SCons/Scanner/LaTeX.py
+++ b/third_party/scons/scons-local/SCons/Scanner/LaTeX.py
@@ -27,23 +27,37 @@ This module implements the dependency scanner for LaTeX code.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/LaTeX.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/LaTeX.py 3603 2008/10/10 05:46:45 scons"
import os.path
import string
+import re
import SCons.Scanner
def LaTeXScanner():
- """Return a prototype Scanner instance for scanning LaTeX source files"""
+ """Return a prototype Scanner instance for scanning LaTeX source files
+ when built with latex.
+ """
ds = LaTeX(name = "LaTeXScanner",
suffixes = '$LATEXSUFFIXES',
- path_variable = 'TEXINPUTS',
- regex = '\\\\(include|includegraphics(?:\[[^\]]+\])?|input|bibliography|usepackage){([^}]*)}',
+ # in the search order, see below in LaTeX class docstring
+ graphics_extensions = ['.eps', '.ps'],
+ recursive = 0)
+ return ds
+
+def PDFLaTeXScanner():
+ """Return a prototype Scanner instance for scanning LaTeX source files
+ when built with pdflatex.
+ """
+ ds = LaTeX(name = "PDFLaTeXScanner",
+ suffixes = '$LATEXSUFFIXES',
+ # in the search order, see below in LaTeX class docstring
+ graphics_extensions = ['.pdf', '.png', '.jpg', '.gif', '.tif'],
recursive = 0)
return ds
-class LaTeX(SCons.Scanner.Classic):
+class LaTeX(SCons.Scanner.Base):
"""Class for scanning LaTeX files for included files.
Unlike most scanners, which use regular expressions that just
@@ -51,76 +65,198 @@ class LaTeX(SCons.Scanner.Classic):
of the keyword for the inclusion ("include", "includegraphics",
"input", or "bibliography"), and then the file name itself.
Based on a quick look at LaTeX documentation, it seems that we
- need a should append .tex suffix for the "include" keywords,
- append .tex if there is no extension for the "input" keyword,
- but leave the file name untouched for "includegraphics." For
- the "bibliography" keyword we need to add .bib if there is
- no extension. (This need to be revisited since if there
- is no extension for an "includegraphics" keyword latex will
- append .ps or .eps to find the file; while pdftex will use
- other extensions.)
+ should append .tex suffix for the "include" keywords, append .tex if
+ there is no extension for the "input" keyword, and need to add .bib
+ for the "bibliography" keyword that does not accept extensions by itself.
+
+ Finally, if there is no extension for an "includegraphics" keyword
+ latex will append .ps or .eps to find the file, while pdftex may use .pdf,
+ .jpg, .tif, .mps, or .png.
+
+ The actual subset and search order may be altered by
+ DeclareGraphicsExtensions command. This complication is ignored.
+ The default order corresponds to experimentation with teTeX
+ $ latex --version
+ pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
+ kpathsea version 3.5.4
+ The order is:
+ ['.eps', '.ps'] for latex
+ ['.png', '.pdf', '.jpg', '.tif'].
+
+ Another difference is that the search path is determined by the type
+ of the file being searched:
+ env['TEXINPUTS'] for "input" and "include" keywords
+ env['TEXINPUTS'] for "includegraphics" keyword
+ env['BIBINPUTS'] for "bibliography" keyword
+ env['BSTINPUTS'] for "bibliographystyle" keyword
+
+ FIXME: also look for the class or style in document[class|style]{}
+ FIXME: also look for the argument of bibliographystyle{}
"""
- def latex_name(self, include):
+ keyword_paths = {'include': 'TEXINPUTS',
+ 'input': 'TEXINPUTS',
+ 'includegraphics': 'TEXINPUTS',
+ 'bibliography': 'BIBINPUTS',
+ 'bibliographystyle': 'BSTINPUTS',
+ 'usepackage': 'TEXINPUTS'}
+ env_variables = SCons.Util.unique(keyword_paths.values())
+
+ def __init__(self, name, suffixes, graphics_extensions, *args, **kw):
+
+ # We have to include \n with the % we exclude from the first part
+ # part of the regex because the expression is compiled with re.M.
+ # Without the \n, the ^ could match the beginning of a *previous*
+ # line followed by one or more newline characters (i.e. blank
+ # lines), interfering with a match on the next line.
+ regex = r'^[^%\n]*\\(include|includegraphics(?:\[[^\]]+\])?|input|bibliography|usepackage){([^}]*)}'
+ self.cre = re.compile(regex, re.M)
+ self.graphics_extensions = graphics_extensions
+
+ def _scan(node, env, path=(), self=self):
+ node = node.rfile()
+ if not node.exists():
+ return []
+ return self.scan(node, path)
+
+ class FindMultiPathDirs:
+ """The stock FindPathDirs function has the wrong granularity:
+ it is called once per target, while we need the path that depends
+ on what kind of included files is being searched. This wrapper
+ hides multiple instances of FindPathDirs, one per the LaTeX path
+ variable in the environment. When invoked, the function calculates
+ and returns all the required paths as a dictionary (converted into
+ a tuple to become hashable). Then the scan function converts it
+ back and uses a dictionary of tuples rather than a single tuple
+ of paths.
+ """
+ def __init__(self, dictionary):
+ self.dictionary = {}
+ for k,n in dictionary.items():
+ self.dictionary[k] = SCons.Scanner.FindPathDirs(n)
+
+ def __call__(self, env, dir=None, target=None, source=None,
+ argument=None):
+ di = {}
+ for k,c in self.dictionary.items():
+ di[k] = c(env, dir=None, target=None, source=None,
+ argument=None)
+ # To prevent "dict is not hashable error"
+ return tuple(di.items())
+
+ class LaTeXScanCheck:
+ """Skip all but LaTeX source files, i.e., do not scan *.eps,
+ *.pdf, *.jpg, etc.
+ """
+ def __init__(self, suffixes):
+ self.suffixes = suffixes
+ def __call__(self, node, env):
+ current = not node.has_builder() or node.is_up_to_date()
+ scannable = node.get_suffix() in env.subst_list(self.suffixes)[0]
+ # Returning false means that the file is not scanned.
+ return scannable and current
+
+ kw['function'] = _scan
+ kw['path_function'] = FindMultiPathDirs(LaTeX.keyword_paths)
+ kw['recursive'] = 1
+ kw['skeys'] = suffixes
+ kw['scan_check'] = LaTeXScanCheck(suffixes)
+ kw['name'] = name
+
+ apply(SCons.Scanner.Base.__init__, (self,) + args, kw)
+
+ def _latex_names(self, include):
filename = include[1]
if include[0] == 'input':
base, ext = os.path.splitext( filename )
if ext == "":
- filename = filename + '.tex'
+ return [filename + '.tex']
if (include[0] == 'include'):
- filename = filename + '.tex'
+ return [filename + '.tex']
if include[0] == 'bibliography':
base, ext = os.path.splitext( filename )
if ext == "":
- filename = filename + '.bib'
+ return [filename + '.bib']
if include[0] == 'usepackage':
base, ext = os.path.splitext( filename )
if ext == "":
- filename = filename + '.sty'
- return filename
+ return [filename + '.sty']
+ if include[0] == 'includegraphics':
+ base, ext = os.path.splitext( filename )
+ if ext == "":
+ #TODO(1.5) return [filename + e for e in self.graphics_extensions]
+ return map(lambda e, f=filename: f+e, self.graphics_extensions)
+ return [filename]
+
def sort_key(self, include):
- return SCons.Node.FS._my_normcase(self.latex_name(include))
+ return SCons.Node.FS._my_normcase(str(include))
+
def find_include(self, include, source_dir, path):
- i = SCons.Node.FS.find_file(self.latex_name(include),
- (source_dir,) + path)
+ try:
+ sub_path = path[include[0]]
+ except (IndexError, KeyError):
+ sub_path = ()
+ try_names = self._latex_names(include)
+ for n in try_names:
+ i = SCons.Node.FS.find_file(n, (source_dir,) + sub_path)
+ if i:
+ return i, include
return i, include
def scan(self, node, path=()):
- #
# Modify the default scan function to allow for the regular
# expression to return a comma separated list of file names
# as can be the case with the bibliography keyword.
- #
- # cache the includes list in node so we only scan it once:
+
+ # Cache the includes list in node so we only scan it once:
+ path_dict = dict(list(path))
+ noopt_cre = re.compile('\[.*$')
if node.includes != None:
includes = node.includes
else:
includes = self.cre.findall(node.get_contents())
+ # 1. Split comma-separated lines, e.g.
+ # ('bibliography', 'phys,comp')
+ # should become two entries
+ # ('bibliography', 'phys')
+ # ('bibliography', 'comp')
+ # 2. Remove the options, e.g., such as
+ # ('includegraphics[clip,width=0.7\\linewidth]', 'picture.eps')
+ # should become
+ # ('includegraphics', 'picture.eps')
+ split_includes = []
+ for include in includes:
+ inc_type = noopt_cre.sub('', include[0])
+ inc_list = string.split(include[1],',')
+ for j in range(len(inc_list)):
+ split_includes.append( (inc_type, inc_list[j]) )
+ #
+ includes = split_includes
node.includes = includes
# This is a hand-coded DSU (decorate-sort-undecorate, or
# Schwartzian transform) pattern. The sort key is the raw name
- # of the file as specifed on the #include line (including the
- # " or <, since that may affect what file is found), which lets
+ # of the file as specifed on the \include, \input, etc. line.
+ # TODO: what about the comment in the original Classic scanner:
+ # """which lets
# us keep the sort order constant regardless of whether the file
- # is actually found in a Repository or locally.
+ # is actually found in a Repository or locally."""
nodes = []
source_dir = node.get_dir()
for include in includes:
#
# Handle multiple filenames in include[1]
#
- inc_list = string.split(include[1],',')
- for j in range(len(inc_list)):
- include_local = [include[0],inc_list[j]]
- n, i = self.find_include(include_local, source_dir, path)
-
+ n, i = self.find_include(include, source_dir, path_dict)
if n is None:
- SCons.Warnings.warn(SCons.Warnings.DependencyWarning,
- "No dependency generated for file: %s (included from: %s) -- file not found" % (i, node))
+ # Do not bother with 'usepackage' warnings, as they most
+ # likely refer to system-level files
+ if include[0] != 'usepackage':
+ SCons.Warnings.warn(SCons.Warnings.DependencyWarning,
+ "No dependency generated for file: %s (included from: %s) -- file not found" % (i, node))
else:
- sortkey = self.sort_key(include)
+ sortkey = self.sort_key(n)
nodes.append((sortkey, n))
-
+ #
nodes.sort()
nodes = map(lambda pair: pair[1], nodes)
return nodes
diff --git a/third_party/scons/scons-local/SCons/Scanner/Prog.py b/third_party/scons/scons-local/SCons/Scanner/Prog.py
index 4b5f2be..048266a 100644
--- a/third_party/scons/scons-local/SCons/Scanner/Prog.py
+++ b/third_party/scons/scons-local/SCons/Scanner/Prog.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/Prog.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/Prog.py 3603 2008/10/10 05:46:45 scons"
import string
diff --git a/third_party/scons/scons-local/SCons/Scanner/RC.py b/third_party/scons/scons-local/SCons/Scanner/RC.py
new file mode 100644
index 0000000..051eb3d
--- /dev/null
+++ b/third_party/scons/scons-local/SCons/Scanner/RC.py
@@ -0,0 +1,49 @@
+"""SCons.Scanner.RC
+
+This module implements the depenency scanner for RC (Interface
+Definition Language) files.
+
+"""
+
+#
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
+#
+# 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.
+#
+
+__revision__ = "src/engine/SCons/Scanner/RC.py 3603 2008/10/10 05:46:45 scons"
+
+import SCons.Node.FS
+import SCons.Scanner
+import re
+
+def RCScan():
+ """Return a prototype Scanner instance for scanning RC source files"""
+
+ res_re= r'^(?:\s*#\s*(?:include)|' \
+ '.*?\s+(?:ICON|BITMAP|CURSOR|HTML|FONT|MESSAGETABLE|TYPELIB|REGISTRY|D3DFX)' \
+ '\s*.*?)' \
+ '\s*(<|"| )([^>"\s]+)(?:[>" ])*$'
+ resScanner = SCons.Scanner.ClassicCPP( "ResourceScanner",
+ "$RCSUFFIXES",
+ "CPPPATH",
+ res_re )
+
+ return resScanner
diff --git a/third_party/scons/scons-local/SCons/Scanner/__init__.py b/third_party/scons/scons-local/SCons/Scanner/__init__.py
index fe6ce86..2df41c1 100644
--- a/third_party/scons/scons-local/SCons/Scanner/__init__.py
+++ b/third_party/scons/scons-local/SCons/Scanner/__init__.py
@@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Scanner/__init__.py 3603 2008/10/10 05:46:45 scons"
import re
import string
diff --git a/third_party/scons/scons-local/SCons/Script/Interactive.py b/third_party/scons/scons-local/SCons/Script/Interactive.py
index e54b008..4618920 100644
--- a/third_party/scons/scons-local/SCons/Script/Interactive.py
+++ b/third_party/scons/scons-local/SCons/Script/Interactive.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/Interactive.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Script/Interactive.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """
SCons interactive mode
diff --git a/third_party/scons/scons-local/SCons/Script/Main.py b/third_party/scons/scons-local/SCons/Script/Main.py
index 3893ee8..05063aa 100644
--- a/third_party/scons/scons-local/SCons/Script/Main.py
+++ b/third_party/scons/scons-local/SCons/Script/Main.py
@@ -34,7 +34,7 @@ it goes here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/Main.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Script/Main.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
@@ -966,6 +966,9 @@ def _main(parser):
SCons.Job.explicit_stack_size = options.stack_size
+ if options.md5_chunksize:
+ SCons.Node.FS.File.md5_chunksize = options.md5_chunksize
+
platform = SCons.Platform.platform_module()
if options.interactive:
diff --git a/third_party/scons/scons-local/SCons/Script/SConsOptions.py b/third_party/scons/scons-local/SCons/Script/SConsOptions.py
index 786e756..40e811a 100644
--- a/third_party/scons/scons-local/SCons/Script/SConsOptions.py
+++ b/third_party/scons/scons-local/SCons/Script/SConsOptions.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py 3603 2008/10/10 05:46:45 scons"
import optparse
import re
@@ -126,6 +126,7 @@ class SConsValues(optparse.Values):
'help',
'implicit_cache',
'max_drift',
+ 'md5_chunksize',
'no_exec',
'num_jobs',
'random',
@@ -177,6 +178,11 @@ class SConsValues(optparse.Values):
value = int(value)
except ValueError:
raise SCons.Errors.UserError, "An integer is required: %s"%repr(value)
+ elif name == 'md5_chunksize':
+ try:
+ value = int(value)
+ except ValueError:
+ raise SCons.Errors.UserError, "An integer is required: %s"%repr(value)
elif name == 'warn':
if SCons.Util.is_String(value):
value = [value]
@@ -726,6 +732,13 @@ def Parser(version):
help="Set maximum system clock drift to N seconds.",
metavar="N")
+ op.add_option('--md5-chunksize',
+ nargs=1, type="int",
+ dest='md5_chunksize', default=SCons.Node.FS.File.md5_chunksize,
+ action="store",
+ help="Set chunk-size for MD5 signature computation to N kilobytes.",
+ metavar="N")
+
op.add_option('-n', '--no-exec', '--just-print', '--dry-run', '--recon',
dest='no_exec', default=False,
action="store_true",
diff --git a/third_party/scons/scons-local/SCons/Script/SConscript.py b/third_party/scons/scons-local/SCons/Script/SConscript.py
index bc806fd..87cc8cf 100644
--- a/third_party/scons/scons-local/SCons/Script/SConscript.py
+++ b/third_party/scons/scons-local/SCons/Script/SConscript.py
@@ -28,7 +28,7 @@ files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConscript.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Script/SConscript.py 3603 2008/10/10 05:46:45 scons"
import SCons
import SCons.Action
diff --git a/third_party/scons/scons-local/SCons/Script/__init__.py b/third_party/scons/scons-local/SCons/Script/__init__.py
index 33835ed..76c4cd3 100644
--- a/third_party/scons/scons-local/SCons/Script/__init__.py
+++ b/third_party/scons/scons-local/SCons/Script/__init__.py
@@ -34,7 +34,7 @@ it goes here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Script/__init__.py 3603 2008/10/10 05:46:45 scons"
import time
start_time = time.time()
diff --git a/third_party/scons/scons-local/SCons/Sig.py b/third_party/scons/scons-local/SCons/Sig.py
index fc4462a..62f9b07 100644
--- a/third_party/scons/scons-local/SCons/Sig.py
+++ b/third_party/scons/scons-local/SCons/Sig.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Sig.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Sig.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """Place-holder for the old SCons.Sig module hierarchy
diff --git a/third_party/scons/scons-local/SCons/Subst.py b/third_party/scons/scons-local/SCons/Subst.py
index d6dac31..df3942f 100644
--- a/third_party/scons/scons-local/SCons/Subst.py
+++ b/third_party/scons/scons-local/SCons/Subst.py
@@ -27,7 +27,7 @@ SCons string substitution.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Subst.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Subst.py 3603 2008/10/10 05:46:45 scons"
import re
import string
@@ -270,7 +270,13 @@ def subst_dict(target, source):
dict = {}
if target:
- tnl = NLWrapper(target, lambda x: x.get_subst_proxy())
+ def get_tgt_subst_proxy(thing):
+ try:
+ subst_proxy = thing.get_subst_proxy()
+ except AttributeError:
+ subst_proxy = thing # probably a string, just return it
+ return subst_proxy
+ tnl = NLWrapper(target, get_tgt_subst_proxy)
dict['TARGETS'] = Targets_or_Sources(tnl)
dict['TARGET'] = Target_or_Source(tnl)
else:
@@ -285,7 +291,10 @@ def subst_dict(target, source):
pass
else:
node = rfile()
- return node.get_subst_proxy()
+ try:
+ return node.get_subst_proxy()
+ except AttributeError:
+ return node # probably a String, just return it
snl = NLWrapper(source, get_src_subst_proxy)
dict['SOURCES'] = Targets_or_Sources(snl)
dict['SOURCE'] = Target_or_Source(snl)
diff --git a/third_party/scons/scons-local/SCons/Taskmaster.py b/third_party/scons/scons-local/SCons/Taskmaster.py
index 4b2e0c7..e8810a8 100644
--- a/third_party/scons/scons-local/SCons/Taskmaster.py
+++ b/third_party/scons/scons-local/SCons/Taskmaster.py
@@ -48,7 +48,7 @@ interface and the SCons build engine. There are two key classes here:
target(s) that it decides need to be evaluated and/or built.
"""
-__revision__ = "src/engine/SCons/Taskmaster.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Taskmaster.py 3603 2008/10/10 05:46:45 scons"
from itertools import chain
import operator
@@ -595,14 +595,14 @@ class Taskmaster:
self.ready_exc = (SCons.Errors.ExplicitExit, e)
if T: T.write('Taskmaster: SystemExit\n')
return node
- except:
+ except Exception, e:
# We had a problem just trying to figure out the
# children (like a child couldn't be linked in to a
# VariantDir, or a Scanner threw something). Arrange to
# raise the exception when the Task is "executed."
self.ready_exc = sys.exc_info()
if S: S.problem = S.problem + 1
- if T: T.write('Taskmaster: exception while scanning children.\n')
+ if T: T.write('Taskmaster: exception %s while scanning children.\n'%s)
return node
children_not_visited = []
diff --git a/third_party/scons/scons-local/SCons/Tool/386asm.py b/third_party/scons/scons-local/SCons/Tool/386asm.py
index 83e5349..850d909 100644
--- a/third_party/scons/scons-local/SCons/Tool/386asm.py
+++ b/third_party/scons/scons-local/SCons/Tool/386asm.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/386asm.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/386asm.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.PharLapCommon import addPharLapPaths
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/BitKeeper.py b/third_party/scons/scons-local/SCons/Tool/BitKeeper.py
index 672e232..ce3a5da 100644
--- a/third_party/scons/scons-local/SCons/Tool/BitKeeper.py
+++ b/third_party/scons/scons-local/SCons/Tool/BitKeeper.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/BitKeeper.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/BitKeeper.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
diff --git a/third_party/scons/scons-local/SCons/Tool/CVS.py b/third_party/scons/scons-local/SCons/Tool/CVS.py
index 2d94b89..76a696f 100644
--- a/third_party/scons/scons-local/SCons/Tool/CVS.py
+++ b/third_party/scons/scons-local/SCons/Tool/CVS.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/CVS.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/CVS.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
diff --git a/third_party/scons/scons-local/SCons/Tool/FortranCommon.py b/third_party/scons/scons-local/SCons/Tool/FortranCommon.py
index c11ecac..3773197 100644
--- a/third_party/scons/scons-local/SCons/Tool/FortranCommon.py
+++ b/third_party/scons/scons-local/SCons/Tool/FortranCommon.py
@@ -27,7 +27,7 @@ Stuff for processing Fortran, common to all fortran dialects.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/FortranCommon.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/FortranCommon.py 3603 2008/10/10 05:46:45 scons"
import re
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/JavaCommon.py b/third_party/scons/scons-local/SCons/Tool/JavaCommon.py
index f182072..495610f 100644
--- a/third_party/scons/scons-local/SCons/Tool/JavaCommon.py
+++ b/third_party/scons/scons-local/SCons/Tool/JavaCommon.py
@@ -27,7 +27,7 @@ Stuff for processing Java.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/JavaCommon.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/JavaCommon.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/Perforce.py b/third_party/scons/scons-local/SCons/Tool/Perforce.py
index 82128b2..d93bbe0 100644
--- a/third_party/scons/scons-local/SCons/Tool/Perforce.py
+++ b/third_party/scons/scons-local/SCons/Tool/Perforce.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/Perforce.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/Perforce.py 3603 2008/10/10 05:46:45 scons"
import os
diff --git a/third_party/scons/scons-local/SCons/Tool/PharLapCommon.py b/third_party/scons/scons-local/SCons/Tool/PharLapCommon.py
index 9ba7260..0ac3d14 100644
--- a/third_party/scons/scons-local/SCons/Tool/PharLapCommon.py
+++ b/third_party/scons/scons-local/SCons/Tool/PharLapCommon.py
@@ -29,7 +29,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/RCS.py b/third_party/scons/scons-local/SCons/Tool/RCS.py
index 872b217..5872d0d 100644
--- a/third_party/scons/scons-local/SCons/Tool/RCS.py
+++ b/third_party/scons/scons-local/SCons/Tool/RCS.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/RCS.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/RCS.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
diff --git a/third_party/scons/scons-local/SCons/Tool/SCCS.py b/third_party/scons/scons-local/SCons/Tool/SCCS.py
index 41f6112..1a73c74 100644
--- a/third_party/scons/scons-local/SCons/Tool/SCCS.py
+++ b/third_party/scons/scons-local/SCons/Tool/SCCS.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/SCCS.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/SCCS.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
diff --git a/third_party/scons/scons-local/SCons/Tool/Subversion.py b/third_party/scons/scons-local/SCons/Tool/Subversion.py
index 181756e..cd4bb09 100644
--- a/third_party/scons/scons-local/SCons/Tool/Subversion.py
+++ b/third_party/scons/scons-local/SCons/Tool/Subversion.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/Subversion.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/Subversion.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/__init__.py b/third_party/scons/scons-local/SCons/Tool/__init__.py
index 4868db7..9baaccc 100644
--- a/third_party/scons/scons-local/SCons/Tool/__init__.py
+++ b/third_party/scons/scons-local/SCons/Tool/__init__.py
@@ -36,7 +36,7 @@ tool definition.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/__init__.py 3603 2008/10/10 05:46:45 scons"
import imp
import sys
@@ -55,6 +55,7 @@ DefaultToolpath=[]
CScanner = SCons.Scanner.C.CScanner()
DScanner = SCons.Scanner.D.DScanner()
LaTeXScanner = SCons.Scanner.LaTeX.LaTeXScanner()
+PDFLaTeXScanner = SCons.Scanner.LaTeX.PDFLaTeXScanner()
ProgramScanner = SCons.Scanner.Prog.ProgramScanner()
SourceFileScanner = SCons.Scanner.Base({}, name='SourceFileScanner')
@@ -76,8 +77,13 @@ for suffix in CSuffixes:
for suffix in DSuffixes:
SourceFileScanner.add_scanner(suffix, DScanner)
+# FIXME: what should be done here? Two scanners scan the same extensions,
+# but look for different files, e.g., "picture.eps" vs. "picture.pdf".
+# The builders for DVI and PDF explicitly reference their scanners
+# I think that means this is not needed???
for suffix in LaTeXSuffixes:
- SourceFileScanner.add_scanner(suffix, LaTeXScanner)
+ SourceFileScanner.add_scanner(suffix, LaTeXScanner)
+ SourceFileScanner.add_scanner(suffix, PDFLaTeXScanner)
class Tool:
def __init__(self, name, toolpath=[], **kw):
diff --git a/third_party/scons/scons-local/SCons/Tool/aixc++.py b/third_party/scons/scons-local/SCons/Tool/aixc++.py
index c0fcfb0..1ccbc54 100644
--- a/third_party/scons/scons-local/SCons/Tool/aixc++.py
+++ b/third_party/scons/scons-local/SCons/Tool/aixc++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixc++.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/aixc++.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/aixcc.py b/third_party/scons/scons-local/SCons/Tool/aixcc.py
index 524ff63..f16700a 100644
--- a/third_party/scons/scons-local/SCons/Tool/aixcc.py
+++ b/third_party/scons/scons-local/SCons/Tool/aixcc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixcc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/aixcc.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/aixf77.py b/third_party/scons/scons-local/SCons/Tool/aixf77.py
index cf19b68..d09e12c 100644
--- a/third_party/scons/scons-local/SCons/Tool/aixf77.py
+++ b/third_party/scons/scons-local/SCons/Tool/aixf77.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixf77.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/aixf77.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/aixlink.py b/third_party/scons/scons-local/SCons/Tool/aixlink.py
index 7a875c6..1c252e1d 100644
--- a/third_party/scons/scons-local/SCons/Tool/aixlink.py
+++ b/third_party/scons/scons-local/SCons/Tool/aixlink.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/aixlink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/aixlink.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/applelink.py b/third_party/scons/scons-local/SCons/Tool/applelink.py
index 20aa7fa..ee22a9a 100644
--- a/third_party/scons/scons-local/SCons/Tool/applelink.py
+++ b/third_party/scons/scons-local/SCons/Tool/applelink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/applelink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/applelink.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/ar.py b/third_party/scons/scons-local/SCons/Tool/ar.py
index ed01d26..60af86e 100644
--- a/third_party/scons/scons-local/SCons/Tool/ar.py
+++ b/third_party/scons/scons-local/SCons/Tool/ar.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ar.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/ar.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/as.py b/third_party/scons/scons-local/SCons/Tool/as.py
index d56d63b..120ba64 100644
--- a/third_party/scons/scons-local/SCons/Tool/as.py
+++ b/third_party/scons/scons-local/SCons/Tool/as.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/as.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/as.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
@@ -40,7 +40,7 @@ import SCons.Util
assemblers = ['as']
ASSuffixes = ['.s', '.asm', '.ASM']
-ASPPSuffixes = ['.spp', '.SPP']
+ASPPSuffixes = ['.spp', '.SPP', '.sx']
if SCons.Util.case_sensitive_suffixes('.s', '.S'):
ASPPSuffixes.extend(['.S'])
else:
diff --git a/third_party/scons/scons-local/SCons/Tool/bcc32.py b/third_party/scons/scons-local/SCons/Tool/bcc32.py
index 0f55234..996e580 100644
--- a/third_party/scons/scons-local/SCons/Tool/bcc32.py
+++ b/third_party/scons/scons-local/SCons/Tool/bcc32.py
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/bcc32.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/bcc32.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/c++.py b/third_party/scons/scons-local/SCons/Tool/c++.py
index 34c6858..b529ea6 100644
--- a/third_party/scons/scons-local/SCons/Tool/c++.py
+++ b/third_party/scons/scons-local/SCons/Tool/c++.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/c++.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/c++.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/cc.py b/third_party/scons/scons-local/SCons/Tool/cc.py
index b3a5e7a..3966ee4 100644
--- a/third_party/scons/scons-local/SCons/Tool/cc.py
+++ b/third_party/scons/scons-local/SCons/Tool/cc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/cc.py 3603 2008/10/10 05:46:45 scons"
import SCons.Tool
import SCons.Defaults
diff --git a/third_party/scons/scons-local/SCons/Tool/cvf.py b/third_party/scons/scons-local/SCons/Tool/cvf.py
index ef1364f..4f479e3 100644
--- a/third_party/scons/scons-local/SCons/Tool/cvf.py
+++ b/third_party/scons/scons-local/SCons/Tool/cvf.py
@@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/cvf.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/cvf.py 3603 2008/10/10 05:46:45 scons"
import fortran
diff --git a/third_party/scons/scons-local/SCons/Tool/default.py b/third_party/scons/scons-local/SCons/Tool/default.py
index d40248a..286f11e 100644
--- a/third_party/scons/scons-local/SCons/Tool/default.py
+++ b/third_party/scons/scons-local/SCons/Tool/default.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/default.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/default.py 3603 2008/10/10 05:46:45 scons"
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/dmd.py b/third_party/scons/scons-local/SCons/Tool/dmd.py
index 93f6739..a1260ab 100644
--- a/third_party/scons/scons-local/SCons/Tool/dmd.py
+++ b/third_party/scons/scons-local/SCons/Tool/dmd.py
@@ -54,7 +54,7 @@ Lib tool variables:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dmd.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/dmd.py 3603 2008/10/10 05:46:45 scons"
import os
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/dvi.py b/third_party/scons/scons-local/SCons/Tool/dvi.py
index 84e6838..9613d52 100644
--- a/third_party/scons/scons-local/SCons/Tool/dvi.py
+++ b/third_party/scons/scons-local/SCons/Tool/dvi.py
@@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvi.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/dvi.py 3603 2008/10/10 05:46:45 scons"
import SCons.Builder
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/dvipdf.py b/third_party/scons/scons-local/SCons/Tool/dvipdf.py
index 9a8353a..5c5d35c 100644
--- a/third_party/scons/scons-local/SCons/Tool/dvipdf.py
+++ b/third_party/scons/scons-local/SCons/Tool/dvipdf.py
@@ -31,14 +31,55 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvipdf.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/dvipdf.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Defaults
import SCons.Tool.pdf
+import SCons.Tool.tex
import SCons.Util
+_null = SCons.Tool.tex._Null
+
+def DviPdfPsFunction(XXXDviAction, target = None, source= None, env=None):
+ """A builder for DVI files that sets the TEXPICTS environment
+ variable before running dvi2ps or dvipdf."""
+
+ try:
+ abspath = source[0].attributes.path
+ except AttributeError :
+ abspath = ''
+
+ saved_env = {}
+ saved_env['TEXPICTS'] = SCons.Tool.tex.modify_env_var(env, 'TEXPICTS', abspath)
+
+ result = XXXDviAction(target, source, env)
+
+ if saved_env['TEXPICTS'] is _null:
+ try:
+ del env['ENV']['TEXPICTS']
+ except KeyError:
+ pass # was never set
+ else:
+ env['ENV']['TEXPICTS'] = saved_env['TEXPICTS']
+
+ return result
+
+def DviPdfFunction(target = None, source= None, env=None):
+ result = DviPdfPsFunction(PDFAction,target,source,env)
+ return result
+
+def DviPdfStrFunction(target = None, source= None, env=None):
+ """A strfunction for dvipdf that returns the appropriate
+ command string for the no_exec options."""
+ if env.GetOption("no_exec"):
+ result = env.subst('$DVIPDFCOM',0,target,source)
+ else:
+ result = ''
+ return result
+
PDFAction = None
+DVIPDFAction = None
def PDFEmitter(target, source, env):
"""Strips any .aux or .log files from the input source list.
@@ -57,11 +98,15 @@ def generate(env):
if PDFAction is None:
PDFAction = SCons.Action.Action('$DVIPDFCOM', '$DVIPDFCOMSTR')
+ global DVIPDFAction
+ if DVIPDFAction is None:
+ DVIPDFAction = SCons.Action.Action(DviPdfFunction, strfunction = DviPdfStrFunction)
+
import pdf
pdf.generate(env)
bld = env['BUILDERS']['PDF']
- bld.add_action('.dvi', PDFAction)
+ bld.add_action('.dvi', DVIPDFAction)
bld.add_emitter('.dvi', PDFEmitter)
env['DVIPDF'] = 'dvipdf'
diff --git a/third_party/scons/scons-local/SCons/Tool/dvips.py b/third_party/scons/scons-local/SCons/Tool/dvips.py
index 435adc8..74820ab 100644
--- a/third_party/scons/scons-local/SCons/Tool/dvips.py
+++ b/third_party/scons/scons-local/SCons/Tool/dvips.py
@@ -31,13 +31,28 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvips.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/dvips.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
+import SCons.Tool.dvipdf
import SCons.Util
+def DviPsFunction(target = None, source= None, env=None):
+ result = SCons.Tool.dvipdf.DviPdfPsFunction(PSAction,target,source,env)
+ return result
+
+def DviPsStrFunction(target = None, source= None, env=None):
+ """A strfunction for dvipdf that returns the appropriate
+ command string for the no_exec options."""
+ if env.GetOption("no_exec"):
+ result = env.subst('$PSCOM',0,target,source)
+ else:
+ result = ''
+ return result
+
PSAction = None
+DVIPSAction = None
PSBuilder = None
def generate(env):
@@ -46,6 +61,10 @@ def generate(env):
if PSAction is None:
PSAction = SCons.Action.Action('$PSCOM', '$PSCOMSTR')
+ global DVIPSAction
+ if DVIPSAction is None:
+ DVIPSAction = SCons.Action.Action(DviPsFunction, strfunction = DviPsStrFunction)
+
global PSBuilder
if PSBuilder is None:
PSBuilder = SCons.Builder.Builder(action = PSAction,
diff --git a/third_party/scons/scons-local/SCons/Tool/f77.py b/third_party/scons/scons-local/SCons/Tool/f77.py
index fc68b48..6fe0c3e 100644
--- a/third_party/scons/scons-local/SCons/Tool/f77.py
+++ b/third_party/scons/scons-local/SCons/Tool/f77.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f77.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/f77.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Scanner.Fortran
diff --git a/third_party/scons/scons-local/SCons/Tool/f90.py b/third_party/scons/scons-local/SCons/Tool/f90.py
index c02027d..c7f54b3 100644
--- a/third_party/scons/scons-local/SCons/Tool/f90.py
+++ b/third_party/scons/scons-local/SCons/Tool/f90.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f90.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/f90.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Scanner.Fortran
diff --git a/third_party/scons/scons-local/SCons/Tool/f95.py b/third_party/scons/scons-local/SCons/Tool/f95.py
index cbd36dc..b562b7e 100644
--- a/third_party/scons/scons-local/SCons/Tool/f95.py
+++ b/third_party/scons/scons-local/SCons/Tool/f95.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/f95.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/f95.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/filesystem.py b/third_party/scons/scons-local/SCons/Tool/filesystem.py
index 06b5cb3..2e921b3 100644
--- a/third_party/scons/scons-local/SCons/Tool/filesystem.py
+++ b/third_party/scons/scons-local/SCons/Tool/filesystem.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/filesystem.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/filesystem.py 3603 2008/10/10 05:46:45 scons"
import SCons
from SCons.Tool.install import copyFunc
diff --git a/third_party/scons/scons-local/SCons/Tool/fortran.py b/third_party/scons/scons-local/SCons/Tool/fortran.py
index 57998f4..ef6be0a 100644
--- a/third_party/scons/scons-local/SCons/Tool/fortran.py
+++ b/third_party/scons/scons-local/SCons/Tool/fortran.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/fortran.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/fortran.py 3603 2008/10/10 05:46:45 scons"
import re
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/g++.py b/third_party/scons/scons-local/SCons/Tool/g++.py
index 5b1ab9f..47c8477 100644
--- a/third_party/scons/scons-local/SCons/Tool/g++.py
+++ b/third_party/scons/scons-local/SCons/Tool/g++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/g++.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/g++.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
@@ -63,9 +63,11 @@ def generate(env):
env['SHOBJSUFFIX'] = '.pic.o'
# determine compiler version
if env['CXX']:
+ #pipe = SCons.Action._subproc(env, [env['CXX'], '-dumpversion'],
pipe = SCons.Action._subproc(env, [env['CXX'], '--version'],
stderr = subprocess.PIPE,
stdout = subprocess.PIPE)
+ if pipe.wait() != 0: return
# -dumpversion was added in GCC 3.0. As long as we're supporting
# GCC versions older than that, we should use --version and a
# regular expression.
diff --git a/third_party/scons/scons-local/SCons/Tool/g77.py b/third_party/scons/scons-local/SCons/Tool/g77.py
index 3171e8f..8c1d245 100644
--- a/third_party/scons/scons-local/SCons/Tool/g77.py
+++ b/third_party/scons/scons-local/SCons/Tool/g77.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/g77.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/g77.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
diff --git a/third_party/scons/scons-local/SCons/Tool/gas.py b/third_party/scons/scons-local/SCons/Tool/gas.py
index f5b744a..0545e19 100644
--- a/third_party/scons/scons-local/SCons/Tool/gas.py
+++ b/third_party/scons/scons-local/SCons/Tool/gas.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gas.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/gas.py 3603 2008/10/10 05:46:45 scons"
as_module = __import__('as', globals(), locals(), [])
diff --git a/third_party/scons/scons-local/SCons/Tool/gcc.py b/third_party/scons/scons-local/SCons/Tool/gcc.py
index 67b42dd..3ec277f 100644
--- a/third_party/scons/scons-local/SCons/Tool/gcc.py
+++ b/third_party/scons/scons-local/SCons/Tool/gcc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gcc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/gcc.py 3603 2008/10/10 05:46:45 scons"
import cc
import os
@@ -53,9 +53,11 @@ def generate(env):
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS -fPIC')
# determine compiler version
if env['CC']:
+ #pipe = SCons.Action._subproc(env, [env['CC'], '-dumpversion'],
pipe = SCons.Action._subproc(env, [env['CC'], '--version'],
stderr = subprocess.PIPE,
stdout = subprocess.PIPE)
+ if pipe.wait() != 0: return
# -dumpversion was added in GCC 3.0. As long as we're supporting
# GCC versions older than that, we should use --version and a
# regular expression.
diff --git a/third_party/scons/scons-local/SCons/Tool/gfortran.py b/third_party/scons/scons-local/SCons/Tool/gfortran.py
index 5be0b24..b9f5bc74 100644
--- a/third_party/scons/scons-local/SCons/Tool/gfortran.py
+++ b/third_party/scons/scons-local/SCons/Tool/gfortran.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gfortran.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/gfortran.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/gnulink.py b/third_party/scons/scons-local/SCons/Tool/gnulink.py
index b093935..eb3c6bd 100644
--- a/third_party/scons/scons-local/SCons/Tool/gnulink.py
+++ b/third_party/scons/scons-local/SCons/Tool/gnulink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gnulink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/gnulink.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/gs.py b/third_party/scons/scons-local/SCons/Tool/gs.py
index a7ca0cc..24f985f 100644
--- a/third_party/scons/scons-local/SCons/Tool/gs.py
+++ b/third_party/scons/scons-local/SCons/Tool/gs.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/gs.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/gs.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Platform
diff --git a/third_party/scons/scons-local/SCons/Tool/hpc++.py b/third_party/scons/scons-local/SCons/Tool/hpc++.py
index 759f9ca..7ec3b58 100644
--- a/third_party/scons/scons-local/SCons/Tool/hpc++.py
+++ b/third_party/scons/scons-local/SCons/Tool/hpc++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpc++.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/hpc++.py 3603 2008/10/10 05:46:45 scons"
import os.path
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/hpcc.py b/third_party/scons/scons-local/SCons/Tool/hpcc.py
index d293d6e..8a5364f 100644
--- a/third_party/scons/scons-local/SCons/Tool/hpcc.py
+++ b/third_party/scons/scons-local/SCons/Tool/hpcc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hpcc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/hpcc.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/hplink.py b/third_party/scons/scons-local/SCons/Tool/hplink.py
index a862650..84317e0 100644
--- a/third_party/scons/scons-local/SCons/Tool/hplink.py
+++ b/third_party/scons/scons-local/SCons/Tool/hplink.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/hplink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/hplink.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/icc.py b/third_party/scons/scons-local/SCons/Tool/icc.py
index 7abfe9e..bfebd7a 100644
--- a/third_party/scons/scons-local/SCons/Tool/icc.py
+++ b/third_party/scons/scons-local/SCons/Tool/icc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/icc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/icc.py 3603 2008/10/10 05:46:45 scons"
import cc
diff --git a/third_party/scons/scons-local/SCons/Tool/icl.py b/third_party/scons/scons-local/SCons/Tool/icl.py
index f1eb0ee..df3c182 100644
--- a/third_party/scons/scons-local/SCons/Tool/icl.py
+++ b/third_party/scons/scons-local/SCons/Tool/icl.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/icl.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/icl.py 3603 2008/10/10 05:46:45 scons"
import SCons.Tool.intelc
diff --git a/third_party/scons/scons-local/SCons/Tool/ifl.py b/third_party/scons/scons-local/SCons/Tool/ifl.py
index 9ae1cc3..56f1dc2 100644
--- a/third_party/scons/scons-local/SCons/Tool/ifl.py
+++ b/third_party/scons/scons-local/SCons/Tool/ifl.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ifl.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/ifl.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
from SCons.Scanner.Fortran import FortranScan
diff --git a/third_party/scons/scons-local/SCons/Tool/ifort.py b/third_party/scons/scons-local/SCons/Tool/ifort.py
index ec05888..2268b9a 100644
--- a/third_party/scons/scons-local/SCons/Tool/ifort.py
+++ b/third_party/scons/scons-local/SCons/Tool/ifort.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ifort.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/ifort.py 3603 2008/10/10 05:46:45 scons"
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/ilink.py b/third_party/scons/scons-local/SCons/Tool/ilink.py
index d0fc6ee..b01b52e 100644
--- a/third_party/scons/scons-local/SCons/Tool/ilink.py
+++ b/third_party/scons/scons-local/SCons/Tool/ilink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ilink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/ilink.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/ilink32.py b/third_party/scons/scons-local/SCons/Tool/ilink32.py
index 4b56284..9b514ca 100644
--- a/third_party/scons/scons-local/SCons/Tool/ilink32.py
+++ b/third_party/scons/scons-local/SCons/Tool/ilink32.py
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/ilink32.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/ilink32.py 3603 2008/10/10 05:46:45 scons"
import SCons.Tool
import SCons.Tool.bcc32
diff --git a/third_party/scons/scons-local/SCons/Tool/install.py b/third_party/scons/scons-local/SCons/Tool/install.py
index cef7241..f9dd046 100644
--- a/third_party/scons/scons-local/SCons/Tool/install.py
+++ b/third_party/scons/scons-local/SCons/Tool/install.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/install.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/install.py 3603 2008/10/10 05:46:45 scons"
import os
import shutil
diff --git a/third_party/scons/scons-local/SCons/Tool/intelc.py b/third_party/scons/scons-local/SCons/Tool/intelc.py
index 1f96e75..18255f7 100644
--- a/third_party/scons/scons-local/SCons/Tool/intelc.py
+++ b/third_party/scons/scons-local/SCons/Tool/intelc.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/intelc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/intelc.py 3603 2008/10/10 05:46:45 scons"
import math, sys, os.path, glob, string, re
diff --git a/third_party/scons/scons-local/SCons/Tool/jar.py b/third_party/scons/scons-local/SCons/Tool/jar.py
index c7a8f17..b5dbe83 100644
--- a/third_party/scons/scons-local/SCons/Tool/jar.py
+++ b/third_party/scons/scons-local/SCons/Tool/jar.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/jar.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/jar.py 3603 2008/10/10 05:46:45 scons"
import SCons.Subst
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/javac.py b/third_party/scons/scons-local/SCons/Tool/javac.py
index f0c84c5..088bcd7 100644
--- a/third_party/scons/scons-local/SCons/Tool/javac.py
+++ b/third_party/scons/scons-local/SCons/Tool/javac.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/javac.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/javac.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/javah.py b/third_party/scons/scons-local/SCons/Tool/javah.py
index 9fd97d4..d5c889f 100644
--- a/third_party/scons/scons-local/SCons/Tool/javah.py
+++ b/third_party/scons/scons-local/SCons/Tool/javah.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/javah.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/javah.py 3603 2008/10/10 05:46:45 scons"
import os.path
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/latex.py b/third_party/scons/scons-local/SCons/Tool/latex.py
index 27b22785..2e11e13 100644
--- a/third_party/scons/scons-local/SCons/Tool/latex.py
+++ b/third_party/scons/scons-local/SCons/Tool/latex.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/latex.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/latex.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Defaults
@@ -58,6 +58,9 @@ def generate(env):
import dvi
dvi.generate(env)
+ import pdf
+ pdf.generate(env)
+
bld = env['BUILDERS']['DVI']
bld.add_action('.ltx', LaTeXAuxAction)
bld.add_action('.latex', LaTeXAuxAction)
diff --git a/third_party/scons/scons-local/SCons/Tool/lex.py b/third_party/scons/scons-local/SCons/Tool/lex.py
index 33909a5..e854eac 100644
--- a/third_party/scons/scons-local/SCons/Tool/lex.py
+++ b/third_party/scons/scons-local/SCons/Tool/lex.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/lex.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/lex.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/link.py b/third_party/scons/scons-local/SCons/Tool/link.py
index f1aad4b..636acbc 100644
--- a/third_party/scons/scons-local/SCons/Tool/link.py
+++ b/third_party/scons/scons-local/SCons/Tool/link.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/link.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/link.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/linkloc.py b/third_party/scons/scons-local/SCons/Tool/linkloc.py
index f5fe634..9a055e9 100644
--- a/third_party/scons/scons-local/SCons/Tool/linkloc.py
+++ b/third_party/scons/scons-local/SCons/Tool/linkloc.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/linkloc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/linkloc.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
diff --git a/third_party/scons/scons-local/SCons/Tool/m4.py b/third_party/scons/scons-local/SCons/Tool/m4.py
index a1b9daf..0c06d22 100644
--- a/third_party/scons/scons-local/SCons/Tool/m4.py
+++ b/third_party/scons/scons-local/SCons/Tool/m4.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/m4.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/m4.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
diff --git a/third_party/scons/scons-local/SCons/Tool/masm.py b/third_party/scons/scons-local/SCons/Tool/masm.py
index d7b16e0..814316ab 100644
--- a/third_party/scons/scons-local/SCons/Tool/masm.py
+++ b/third_party/scons/scons-local/SCons/Tool/masm.py
@@ -31,14 +31,14 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/masm.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/masm.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
import SCons.Util
ASSuffixes = ['.s', '.asm', '.ASM']
-ASPPSuffixes = ['.spp', '.SPP']
+ASPPSuffixes = ['.spp', '.SPP', '.sx']
if SCons.Util.case_sensitive_suffixes('.s', '.S'):
ASPPSuffixes.extend(['.S'])
else:
diff --git a/third_party/scons/scons-local/SCons/Tool/midl.py b/third_party/scons/scons-local/SCons/Tool/midl.py
index b926f62..7414326 100644
--- a/third_party/scons/scons-local/SCons/Tool/midl.py
+++ b/third_party/scons/scons-local/SCons/Tool/midl.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/midl.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/midl.py 3603 2008/10/10 05:46:45 scons"
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/mingw.py b/third_party/scons/scons-local/SCons/Tool/mingw.py
index e28be4f..f9cd9d8 100644
--- a/third_party/scons/scons-local/SCons/Tool/mingw.py
+++ b/third_party/scons/scons-local/SCons/Tool/mingw.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mingw.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/mingw.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/mslib.py b/third_party/scons/scons-local/SCons/Tool/mslib.py
index b34f2a3..88bca89 100644
--- a/third_party/scons/scons-local/SCons/Tool/mslib.py
+++ b/third_party/scons/scons-local/SCons/Tool/mslib.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mslib.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/mslib.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/mslink.py b/third_party/scons/scons-local/SCons/Tool/mslink.py
index ce7ab67..f4fecbf 100644
--- a/third_party/scons/scons-local/SCons/Tool/mslink.py
+++ b/third_party/scons/scons-local/SCons/Tool/mslink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mslink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/mslink.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/msvc.py b/third_party/scons/scons-local/SCons/Tool/msvc.py
index b0b7146..e253528 100644
--- a/third_party/scons/scons-local/SCons/Tool/msvc.py
+++ b/third_party/scons/scons-local/SCons/Tool/msvc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/msvc.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
@@ -45,6 +45,7 @@ import SCons.Tool
import SCons.Tool.msvs
import SCons.Util
import SCons.Warnings
+import SCons.Scanner.RC
CSuffixes = ['.c', '.C']
CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
@@ -660,13 +661,17 @@ pch_action = SCons.Action.Action('$PCHCOM', '$PCHCOMSTR')
pch_builder = SCons.Builder.Builder(action=pch_action, suffix='.pch',
emitter=pch_emitter,
source_scanner=SCons.Tool.SourceFileScanner)
-res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
+
+
+# Logic to build .rc files into .res files (resource files)
+res_scanner = SCons.Scanner.RC.RCScan()
+res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
res_builder = SCons.Builder.Builder(action=res_action,
src_suffix='.rc',
suffix='.res',
src_builder=[],
- source_scanner=SCons.Tool.SourceFileScanner)
-SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
+ source_scanner=res_scanner)
+
def generate(env):
"""Add Builders and construction variables for MSVC++ to an Environment."""
@@ -711,6 +716,7 @@ def generate(env):
env['RC'] = 'rc'
env['RCFLAGS'] = SCons.Util.CLVar('')
+ env['RCSUFFIXES']=['.rc','.rc2']
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
env['BUILDERS']['RES'] = res_builder
env['OBJPREFIX'] = ''
diff --git a/third_party/scons/scons-local/SCons/Tool/msvs.py b/third_party/scons/scons-local/SCons/Tool/msvs.py
index 17be243..6550c9d 100644
--- a/third_party/scons/scons-local/SCons/Tool/msvs.py
+++ b/third_party/scons/scons-local/SCons/Tool/msvs.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvs.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/msvs.py 3603 2008/10/10 05:46:45 scons"
import base64
import md5
@@ -79,7 +79,9 @@ def _generateGUID(slnfile, name):
based on the MD5 signatures of the sln filename plus the name of
the project. It basically just needs to be unique, and not
change with each invocation."""
- solution = _hexdigest(md5.new(str(slnfile)+str(name)).digest()).upper()
+ # TODO(1.5)
+ #solution = _hexdigest(md5.new(str(slnfile)+str(name)).digest()).upper()
+ solution = string.upper(_hexdigest(md5.new(str(slnfile)+str(name)).digest()))
# convert most of the signature to GUID form (discard the rest)
solution = "{" + solution[:8] + "-" + solution[8:12] + "-" + solution[12:16] + "-" + solution[16:20] + "-" + solution[20:32] + "}"
return solution
@@ -295,7 +297,9 @@ class _DSPGenerator:
self.sources[t[0]].append(self.env[t[1]])
for n in sourcenames:
- self.sources[n].sort(lambda a, b: cmp(a.lower(), b.lower()))
+ # TODO(1.5):
+ #self.sources[n].sort(lambda a, b: cmp(a.lower(), b.lower()))
+ self.sources[n].sort(lambda a, b: cmp(string.lower(a), string.lower(b)))
def AddConfig(self, variant, buildtarget, outdir, runfile, cmdargs, dspfile=dspfile):
config = Config()
@@ -394,7 +398,9 @@ class _GenerateV6DSP(_DSPGenerator):
for base in ("BASE ",""):
self.file.write('# PROP %sUse_MFC 0\n'
'# PROP %sUse_Debug_Libraries ' % (base, base))
- if kind.lower().find('debug') < 0:
+ # TODO(1.5):
+ #if kind.lower().find('debug') < 0:
+ if string.find(string.lower(kind), 'debug') < 0:
self.file.write('0\n')
else:
self.file.write('1\n')
@@ -445,13 +451,17 @@ class _GenerateV6DSP(_DSPGenerator):
'Other Files': ''}
cats = categories.keys()
- cats.sort(lambda a, b: cmp(a.lower(), b.lower()))
+ # TODO(1.5):
+ #cats.sort(lambda a, b: cmp(a.lower(), b.lower()))
+ cats.sort(lambda a, b: cmp(string.lower(a), string.lower(b)))
for kind in cats:
if not self.sources[kind]:
continue # skip empty groups
self.file.write('# Begin Group "' + kind + '"\n\n')
- typelist = categories[kind].replace('|',';')
+ # TODO(1.5)
+ #typelist = categories[kind].replace('|', ';')
+ typelist = string.replace(categories[kind], '|', ';')
self.file.write('# PROP Default_Filter "' + typelist + '"\n')
for file in self.sources[kind]:
@@ -474,7 +484,9 @@ class _GenerateV6DSP(_DSPGenerator):
line = dspfile.readline()
while line:
- if line.find("# End Project") > -1:
+ # TODO(1.5):
+ #if line.find("# End Project") > -1:
+ if string.find(line, "# End Project") > -1:
break
line = dspfile.readline()
@@ -692,7 +704,9 @@ class _GenerateV7DSP(_DSPGenerator):
def printSources(self, hierarchy, commonprefix):
sorteditems = hierarchy.items()
- sorteditems.sort(lambda a, b: cmp(a[0].lower(), b[0].lower()))
+ # TODO(1.5):
+ #sorteditems.sort(lambda a, b: cmp(a[0].lower(), b[0].lower()))
+ sorteditems.sort(lambda a, b: cmp(string.lower(a[0]), string.lower(b[0])))
# First folders, then files
for key, value in sorteditems:
@@ -723,7 +737,9 @@ class _GenerateV7DSP(_DSPGenerator):
self.file.write('\t<Files>\n')
cats = categories.keys()
- cats.sort(lambda a, b: cmp(a.lower(), b.lower()))
+ # TODO(1.5)
+ #cats.sort(lambda a, b: cmp(a.lower(), b.lower()))
+ cats.sort(lambda a, b: cmp(string.lower(a), string.lower(b)))
cats = filter(lambda k, s=self: s.sources[k], cats)
for kind in cats:
if len(cats) > 1:
@@ -772,7 +788,9 @@ class _GenerateV7DSP(_DSPGenerator):
line = dspfile.readline()
while line:
- if line.find('<!-- SCons Data:') > -1:
+ # TODO(1.5)
+ #if line.find('<!-- SCons Data:') > -1:
+ if string.find(line, '<!-- SCons Data:') > -1:
break
line = dspfile.readline()
@@ -1252,7 +1270,9 @@ def get_default_visualstudio8_suite(env):
env['MSVS'] = {}
if env.has_key('MSVS_SUITE'):
- suite = env['MSVS_SUITE'].upper()
+ # TODO(1.5)
+ #suite = env['MSVS_SUITE'].upper()
+ suite = string.upper(env['MSVS_SUITE'])
suites = [suite]
else:
suite = 'EXPRESS'
@@ -1471,11 +1491,18 @@ def get_msvs_install_dirs(version = None, vs8suite = None):
while 1:
try:
(vk,vv,t) = SCons.Util.RegEnumValue(sdk,j)
- if vk.lower() == 'keyword':
+ # TODO(1.5):
+ #if vk.lower() == 'keyword':
+ # name = vv
+ #if vk.lower() == 'propagation_date':
+ # date = vv
+ #if vk.lower() == 'version':
+ # version = vv
+ if string.lower(vk) == 'keyword':
name = vv
- if vk.lower() == 'propagation_date':
+ if string.lower(vk) == 'propagation_date':
date = vv
- if vk.lower() == 'version':
+ if string.lower(vk) == 'version':
version = vv
j = j + 1
except SCons.Util.RegError:
diff --git a/third_party/scons/scons-local/SCons/Tool/mwcc.py b/third_party/scons/scons-local/SCons/Tool/mwcc.py
index 9040ad7..066ca73 100644
--- a/third_party/scons/scons-local/SCons/Tool/mwcc.py
+++ b/third_party/scons/scons-local/SCons/Tool/mwcc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mwcc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/mwcc.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/mwld.py b/third_party/scons/scons-local/SCons/Tool/mwld.py
index ac47b23..95db28c 100644
--- a/third_party/scons/scons-local/SCons/Tool/mwld.py
+++ b/third_party/scons/scons-local/SCons/Tool/mwld.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/mwld.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/mwld.py 3603 2008/10/10 05:46:45 scons"
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/nasm.py b/third_party/scons/scons-local/SCons/Tool/nasm.py
index f5846d7..c6d5818 100644
--- a/third_party/scons/scons-local/SCons/Tool/nasm.py
+++ b/third_party/scons/scons-local/SCons/Tool/nasm.py
@@ -31,14 +31,14 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/nasm.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/nasm.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
import SCons.Util
ASSuffixes = ['.s', '.asm', '.ASM']
-ASPPSuffixes = ['.spp', '.SPP']
+ASPPSuffixes = ['.spp', '.SPP', '.sx']
if SCons.Util.case_sensitive_suffixes('.s', '.S'):
ASPPSuffixes.extend(['.S'])
else:
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/__init__.py b/third_party/scons/scons-local/SCons/Tool/packaging/__init__.py
index f50f86c..1014888 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/__init__.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/__init__.py
@@ -26,7 +26,7 @@ SCons Packaging Tool.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 3603 2008/10/10 05:46:45 scons"
import SCons.Environment
from SCons.Variables import *
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/ipk.py b/third_party/scons/scons-local/SCons/Tool/packaging/ipk.py
index a610da9..cf468fe 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/ipk.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/ipk.py
@@ -24,7 +24,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 3603 2008/10/10 05:46:45 scons"
import SCons.Builder
import SCons.Node.FS
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/msi.py b/third_party/scons/scons-local/SCons/Tool/packaging/msi.py
index f7b0a6a..24efad1 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/msi.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/msi.py
@@ -26,7 +26,7 @@ The msi packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/msi.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/msi.py 3603 2008/10/10 05:46:45 scons"
import os
import SCons
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/rpm.py b/third_party/scons/scons-local/SCons/Tool/packaging/rpm.py
index 5a70f8a..617011d 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/rpm.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/rpm.py
@@ -26,7 +26,7 @@ The rpm packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 3603 2008/10/10 05:46:45 scons"
import os
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/src_tarbz2.py b/third_party/scons/scons-local/SCons/Tool/packaging/src_tarbz2.py
index 4c6bb04..ac7f15f 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/src_tarbz2.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/src_tarbz2.py
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.packaging import putintopackageroot
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/src_targz.py b/third_party/scons/scons-local/SCons/Tool/packaging/src_targz.py
index f927dca..365e67f 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/src_targz.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/src_targz.py
@@ -26,7 +26,7 @@ The targz SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.packaging import putintopackageroot
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/src_zip.py b/third_party/scons/scons-local/SCons/Tool/packaging/src_zip.py
index bb21e07..53971ce 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/src_zip.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/src_zip.py
@@ -26,7 +26,7 @@ The zip SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.packaging import putintopackageroot
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py b/third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py
index 1092da7..c54e5ae 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/targz.py b/third_party/scons/scons-local/SCons/Tool/packaging/targz.py
index e6444a6..db1684c 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/targz.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/targz.py
@@ -26,7 +26,7 @@ The targz SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/targz.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/targz.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/third_party/scons/scons-local/SCons/Tool/packaging/zip.py b/third_party/scons/scons-local/SCons/Tool/packaging/zip.py
index 0ba40c7..6387cb1 100644
--- a/third_party/scons/scons-local/SCons/Tool/packaging/zip.py
+++ b/third_party/scons/scons-local/SCons/Tool/packaging/zip.py
@@ -26,7 +26,7 @@ The zip SRC packager.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/packaging/zip.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/packaging/zip.py 3603 2008/10/10 05:46:45 scons"
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
diff --git a/third_party/scons/scons-local/SCons/Tool/pdf.py b/third_party/scons/scons-local/SCons/Tool/pdf.py
index 3811d80..4a459f0 100644
--- a/third_party/scons/scons-local/SCons/Tool/pdf.py
+++ b/third_party/scons/scons-local/SCons/Tool/pdf.py
@@ -27,7 +27,7 @@ Common PDF Builder definition for various other Tool modules that use it.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdf.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/pdf.py 3603 2008/10/10 05:46:45 scons"
import SCons.Builder
import SCons.Tool
@@ -41,7 +41,7 @@ def generate(env):
global PDFBuilder
if PDFBuilder is None:
PDFBuilder = SCons.Builder.Builder(action = {},
- source_scanner = SCons.Tool.LaTeXScanner,
+ source_scanner = SCons.Tool.PDFLaTeXScanner,
prefix = '$PDFPREFIX',
suffix = '$PDFSUFFIX',
emitter = {},
diff --git a/third_party/scons/scons-local/SCons/Tool/pdflatex.py b/third_party/scons/scons-local/SCons/Tool/pdflatex.py
index 5492002..1c296ae 100644
--- a/third_party/scons/scons-local/SCons/Tool/pdflatex.py
+++ b/third_party/scons/scons-local/SCons/Tool/pdflatex.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdflatex.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/pdflatex.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/pdftex.py b/third_party/scons/scons-local/SCons/Tool/pdftex.py
index 62fbb7b..7196a91 100644
--- a/third_party/scons/scons-local/SCons/Tool/pdftex.py
+++ b/third_party/scons/scons-local/SCons/Tool/pdftex.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/pdftex.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/pdftex.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/qt.py b/third_party/scons/scons-local/SCons/Tool/qt.py
index 336bde5..3b88439 100644
--- a/third_party/scons/scons-local/SCons/Tool/qt.py
+++ b/third_party/scons/scons-local/SCons/Tool/qt.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/qt.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/qt.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
diff --git a/third_party/scons/scons-local/SCons/Tool/rmic.py b/third_party/scons/scons-local/SCons/Tool/rmic.py
index b6b61aa..3282b0d 100644
--- a/third_party/scons/scons-local/SCons/Tool/rmic.py
+++ b/third_party/scons/scons-local/SCons/Tool/rmic.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rmic.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/rmic.py 3603 2008/10/10 05:46:45 scons"
import os.path
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/rpcgen.py b/third_party/scons/scons-local/SCons/Tool/rpcgen.py
index 3cde214..f2793b5 100644
--- a/third_party/scons/scons-local/SCons/Tool/rpcgen.py
+++ b/third_party/scons/scons-local/SCons/Tool/rpcgen.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rpcgen.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/rpcgen.py 3603 2008/10/10 05:46:45 scons"
from SCons.Builder import Builder
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/rpm.py b/third_party/scons/scons-local/SCons/Tool/rpm.py
index 580b20d..6760641 100644
--- a/third_party/scons/scons-local/SCons/Tool/rpm.py
+++ b/third_party/scons/scons-local/SCons/Tool/rpm.py
@@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/rpm.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/rpm.py 3603 2008/10/10 05:46:45 scons"
import os
import re
diff --git a/third_party/scons/scons-local/SCons/Tool/sgiar.py b/third_party/scons/scons-local/SCons/Tool/sgiar.py
index 667440e..b747dab 100644
--- a/third_party/scons/scons-local/SCons/Tool/sgiar.py
+++ b/third_party/scons/scons-local/SCons/Tool/sgiar.py
@@ -33,7 +33,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgiar.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sgiar.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/sgic++.py b/third_party/scons/scons-local/SCons/Tool/sgic++.py
index f201865..053ad37 100644
--- a/third_party/scons/scons-local/SCons/Tool/sgic++.py
+++ b/third_party/scons/scons-local/SCons/Tool/sgic++.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgic++.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sgic++.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/sgicc.py b/third_party/scons/scons-local/SCons/Tool/sgicc.py
index 6403a9e..79c6604 100644
--- a/third_party/scons/scons-local/SCons/Tool/sgicc.py
+++ b/third_party/scons/scons-local/SCons/Tool/sgicc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgicc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sgicc.py 3603 2008/10/10 05:46:45 scons"
import cc
diff --git a/third_party/scons/scons-local/SCons/Tool/sgilink.py b/third_party/scons/scons-local/SCons/Tool/sgilink.py
index 6e74fd4..b978418 100644
--- a/third_party/scons/scons-local/SCons/Tool/sgilink.py
+++ b/third_party/scons/scons-local/SCons/Tool/sgilink.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sgilink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sgilink.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/sunar.py b/third_party/scons/scons-local/SCons/Tool/sunar.py
index 4ccb9ba..968d103 100644
--- a/third_party/scons/scons-local/SCons/Tool/sunar.py
+++ b/third_party/scons/scons-local/SCons/Tool/sunar.py
@@ -32,7 +32,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunar.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sunar.py 3603 2008/10/10 05:46:45 scons"
import SCons.Defaults
import SCons.Tool
diff --git a/third_party/scons/scons-local/SCons/Tool/sunc++.py b/third_party/scons/scons-local/SCons/Tool/sunc++.py
index 601be09..c0267f9 100644
--- a/third_party/scons/scons-local/SCons/Tool/sunc++.py
+++ b/third_party/scons/scons-local/SCons/Tool/sunc++.py
@@ -31,9 +31,9 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunc++.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sunc++.py 3603 2008/10/10 05:46:45 scons"
-import SCons.Util
+import SCons
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/suncc.py b/third_party/scons/scons-local/SCons/Tool/suncc.py
index 3f004c2..13c2a1e 100644
--- a/third_party/scons/scons-local/SCons/Tool/suncc.py
+++ b/third_party/scons/scons-local/SCons/Tool/suncc.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/suncc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/suncc.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/sunf77.py b/third_party/scons/scons-local/SCons/Tool/sunf77.py
index c2084e4..e7f4187 100644
--- a/third_party/scons/scons-local/SCons/Tool/sunf77.py
+++ b/third_party/scons/scons-local/SCons/Tool/sunf77.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf77.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sunf77.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/sunf90.py b/third_party/scons/scons-local/SCons/Tool/sunf90.py
index 3f01eff..ec6f69f 100644
--- a/third_party/scons/scons-local/SCons/Tool/sunf90.py
+++ b/third_party/scons/scons-local/SCons/Tool/sunf90.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf90.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sunf90.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/sunf95.py b/third_party/scons/scons-local/SCons/Tool/sunf95.py
index d6d7a11..6f924ae 100644
--- a/third_party/scons/scons-local/SCons/Tool/sunf95.py
+++ b/third_party/scons/scons-local/SCons/Tool/sunf95.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunf95.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sunf95.py 3603 2008/10/10 05:46:45 scons"
import SCons.Util
diff --git a/third_party/scons/scons-local/SCons/Tool/sunlink.py b/third_party/scons/scons-local/SCons/Tool/sunlink.py
index 5d2ac7c..aad8bc3 100644
--- a/third_party/scons/scons-local/SCons/Tool/sunlink.py
+++ b/third_party/scons/scons-local/SCons/Tool/sunlink.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/sunlink.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/sunlink.py 3603 2008/10/10 05:46:45 scons"
import os
import os.path
diff --git a/third_party/scons/scons-local/SCons/Tool/swig.py b/third_party/scons/scons-local/SCons/Tool/swig.py
index 9ba4e33..702fea4 100644
--- a/third_party/scons/scons-local/SCons/Tool/swig.py
+++ b/third_party/scons/scons-local/SCons/Tool/swig.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/swig.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/swig.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
diff --git a/third_party/scons/scons-local/SCons/Tool/tar.py b/third_party/scons/scons-local/SCons/Tool/tar.py
index 0dd1716..9c38410 100644
--- a/third_party/scons/scons-local/SCons/Tool/tar.py
+++ b/third_party/scons/scons-local/SCons/Tool/tar.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tar.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/tar.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
diff --git a/third_party/scons/scons-local/SCons/Tool/tex.py b/third_party/scons/scons-local/SCons/Tool/tex.py
index 95aaf1d..3cd18e0 100644
--- a/third_party/scons/scons-local/SCons/Tool/tex.py
+++ b/third_party/scons/scons-local/SCons/Tool/tex.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tex.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/tex.py 3603 2008/10/10 05:46:45 scons"
import os.path
import re
@@ -43,20 +43,53 @@ import SCons.Node
import SCons.Node.FS
import SCons.Util
-warning_rerun_re = re.compile('(^LaTeX Warning:.*Rerun)|(^Package \w+ Warning:.*Rerun)', re.MULTILINE)
+Verbose = False
+must_rerun_latex = True
+
+# these are files that just need to be checked for changes and then rerun latex
+check_suffixes = ['.toc', '.lof', '.lot', '.out', '.nav', '.snm']
+
+# these are files that require bibtex or makeindex to be run when they change
+all_suffixes = check_suffixes + ['.bbl', '.idx', '.nlo', '.glo']
+
+#
+# regular expressions used to search for Latex features
+# or outputs that require rerunning latex
+#
+# search for all .aux files opened by latex (recorded in the .log file)
+openout_aux_re = re.compile(r"\\openout.*`(.*\.aux)'")
+
+#printindex_re = re.compile(r"^[^%]*\\printindex", re.MULTILINE)
+#printnomenclature_re = re.compile(r"^[^%]*\\printnomenclature", re.MULTILINE)
+#printglossary_re = re.compile(r"^[^%]*\\printglossary", re.MULTILINE)
+
+# search to find rerun warnings
+warning_rerun_str = '(^LaTeX Warning:.*Rerun)|(^Package \w+ Warning:.*Rerun)'
+warning_rerun_re = re.compile(warning_rerun_str, re.MULTILINE)
+
+# search to find citation rerun warnings
rerun_citations_str = "^LaTeX Warning:.*\n.*Rerun to get citations correct"
rerun_citations_re = re.compile(rerun_citations_str, re.MULTILINE)
+# search to find undefined references or citations warnings
undefined_references_str = '(^LaTeX Warning:.*undefined references)|(^Package \w+ Warning:.*undefined citations)'
undefined_references_re = re.compile(undefined_references_str, re.MULTILINE)
-openout_aux_re = re.compile(r"\\openout.*`(.*\.aux)'")
-openout_re = re.compile(r"\\openout.*`(.*)'")
-
-makeindex_re = re.compile(r"^[^%]*\\makeindex", re.MULTILINE)
+# used by the emitter
+auxfile_re = re.compile(r".", re.MULTILINE)
tableofcontents_re = re.compile(r"^[^%]*\\tableofcontents", re.MULTILINE)
+makeindex_re = re.compile(r"^[^%]*\\makeindex", re.MULTILINE)
bibliography_re = re.compile(r"^[^%]*\\bibliography", re.MULTILINE)
+listoffigures_re = re.compile(r"^[^%]*\\listoffigures", re.MULTILINE)
+listoftables_re = re.compile(r"^[^%]*\\listoftables", re.MULTILINE)
+hyperref_re = re.compile(r"^[^%]*\\usepackage.*\{hyperref\}", re.MULTILINE)
+makenomenclature_re = re.compile(r"^[^%]*\\makenomenclature", re.MULTILINE)
+makeglossary_re = re.compile(r"^[^%]*\\makeglossary", re.MULTILINE)
+beamer_re = re.compile(r"^[^%]*\\documentclass\{beamer\}", re.MULTILINE)
+
+# search to find all files opened by Latex (recorded in .log file)
+openout_re = re.compile(r"\\openout.*`(.*)'")
# An Action sufficient to build any generic tex file.
TeXAction = None
@@ -71,10 +104,53 @@ BibTeXAction = None
# An action to run MakeIndex on a file.
MakeIndexAction = None
+# An action to run MakeIndex (for nomencl) on a file.
+MakeNclAction = None
+
+# An action to run MakeIndex (for glossary) on a file.
+MakeGlossaryAction = None
+
+# Used as a return value of modify_env_var if the variable is not set.
+class _Null:
+ pass
+_null = _Null
+
+# The user specifies the paths in env[variable], similar to other builders.
+# They may be relative and must be converted to absolute, as expected
+# by LaTeX and Co. The environment may already have some paths in
+# env['ENV'][var]. These paths are honored, but the env[var] paths have
+# higher precedence. All changes are un-done on exit.
+def modify_env_var(env, var, abspath):
+ try:
+ save = env['ENV'][var]
+ except KeyError:
+ save = _null
+ env.PrependENVPath(var, abspath)
+ try:
+ if SCons.Util.is_List(env[var]):
+ #TODO(1.5) env.PrependENVPath(var, [os.path.abspath(str(p)) for p in env[var]])
+ env.PrependENVPath(var, map(lambda p: os.path.abspath(str(p)), env[var]))
+ else:
+ # Split at os.pathsep to convert into absolute path
+ #TODO(1.5) env.PrependENVPath(var, [os.path.abspath(p) for p in str(env[var]).split(os.pathsep)])
+ env.PrependENVPath(var, map(lambda p: os.path.abspath(p), str(env[var]).split(os.pathsep)))
+ except KeyError:
+ pass
+ # Convert into a string explicitly to append ":" (without which it won't search system
+ # paths as well). The problem is that env.AppendENVPath(var, ":")
+ # does not work, refuses to append ":" (os.pathsep).
+ if SCons.Util.is_List(env['ENV'][var]):
+ env['ENV'][var] = os.pathsep.join(env['ENV'][var])
+ # Append the trailing os.pathsep character here to catch the case with no env[var]
+ env['ENV'][var] = env['ENV'][var] + os.pathsep
+ return save
+
def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None):
"""A builder for LaTeX files that checks the output in the aux file
and decides how many times to use LaTeXAction, and BibTeXAction."""
+ global must_rerun_latex
+
# This routine is called with two actions. In this file for DVI builds
# with LaTeXAction and from the pdflatex.py with PDFLaTeXAction
# set this up now for the case where the user requests a different extension
@@ -88,139 +164,188 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
basedir = os.path.split(str(source[0]))[0]
basefile = os.path.split(str(basename))[1]
abspath = os.path.abspath(basedir)
- targetbase = SCons.Util.splitext(str(target[0]))[0]
targetext = os.path.splitext(str(target[0]))[1]
targetdir = os.path.split(str(target[0]))[0]
- # Not sure if these environment changes should go here or make the
- # user do them I undo all but TEXPICTS but there is still the side
- # effect of creating the empty (':') entries in the environment.
-
- def modify_env_var(env, var, abspath):
- try:
- save = env['ENV'][var]
- except KeyError:
- save = ':'
- env['ENV'][var] = ''
- if SCons.Util.is_List(env['ENV'][var]):
- env['ENV'][var] = [abspath] + env['ENV'][var]
- else:
- env['ENV'][var] = abspath + os.pathsep + env['ENV'][var]
- return save
-
- texinputs_save = modify_env_var(env, 'TEXINPUTS', abspath)
- bibinputs_save = modify_env_var(env, 'BIBINPUTS', abspath)
- bstinputs_save = modify_env_var(env, 'BSTINPUTS', abspath)
- texpicts_save = modify_env_var(env, 'TEXPICTS', abspath)
-
- # Create these file names with the target directory since they will
- # be made there. That's because the *COM variables have the cd
- # command in the prolog.
-
- bblfilename = os.path.join(targetdir, basefile + '.bbl')
- bblContents = ""
- if os.path.exists(bblfilename):
- bblContents = open(bblfilename, "rb").read()
-
- idxfilename = os.path.join(targetdir, basefile + '.idx')
- idxContents = ""
- if os.path.exists(idxfilename):
- idxContents = open(idxfilename, "rb").read()
-
- tocfilename = os.path.join(targetdir, basefile + '.toc')
- tocContents = ""
- if os.path.exists(tocfilename):
- tocContents = open(tocfilename, "rb").read()
-
- # generate the file name that latex will generate
- resultfilename = os.path.join(targetdir, basefile + targetext)
-
- # Run LaTeX once to generate a new aux file and log file.
- result = XXXLaTeXAction(target, source, env)
- if result != 0:
- return result
+ saved_env = {}
+ for var in SCons.Scanner.LaTeX.LaTeX.env_variables:
+ saved_env[var] = modify_env_var(env, var, abspath)
- # Decide if various things need to be run, or run again. We check
+ # Create a base file names with the target directory since the auxiliary files
+ # will be made there. That's because the *COM variables have the cd
+ # command in the prolog. We check
# for the existence of files before opening them--even ones like the
# aux file that TeX always creates--to make it possible to write tests
# with stubs that don't necessarily generate all of the same files.
- # Read the log file to find all .aux files
- logfilename = os.path.join(targetbase + '.log')
- auxfiles = []
- if os.path.exists(logfilename):
- content = open(logfilename, "rb").read()
- auxfiles = openout_aux_re.findall(content)
-
- # Now decide if bibtex will need to be run.
- for auxfilename in auxfiles:
- target_aux = os.path.join(targetdir, auxfilename)
- if os.path.exists(target_aux):
- content = open(target_aux, "rb").read()
- if string.find(content, "bibdata") != -1:
- bibfile = env.fs.File(targetbase)
- result = BibTeXAction(bibfile, bibfile, env)
- if result != 0:
- return result
- break
-
- must_rerun_latex = 0
- # Now decide if latex will need to be run again due to table of contents.
- if os.path.exists(tocfilename) and tocContents != open(tocfilename, "rb").read():
- must_rerun_latex = 1
-
- # Now decide if latex will need to be run again due to bibliography.
- if os.path.exists(bblfilename) and bblContents != open(bblfilename, "rb").read():
- must_rerun_latex = 1
-
- # Now decide if latex will need to be run again due to index.
- if os.path.exists(idxfilename) and idxContents != open(idxfilename, "rb").read():
- # We must run makeindex
- idxfile = env.fs.File(targetbase)
- result = MakeIndexAction(idxfile, idxfile, env)
- if result != 0:
- return result
- must_rerun_latex = 1
+ targetbase = os.path.join(targetdir, basefile)
+
+ # if there is a \makeindex there will be a .idx and thus
+ # we have to run makeindex at least once to keep the build
+ # happy even if there is no index.
+ # Same for glossaries and nomenclature
+ src_content = source[0].get_contents()
+ run_makeindex = makeindex_re.search(src_content) and not os.path.exists(targetbase + '.idx')
+ run_nomenclature = makenomenclature_re.search(src_content) and not os.path.exists(targetbase + '.nlo')
+ run_glossary = makeglossary_re.search(src_content) and not os.path.exists(targetbase + '.glo')
+
+ saved_hashes = {}
+ suffix_nodes = {}
+
+ for suffix in all_suffixes:
+ theNode = env.fs.File(targetbase + suffix)
+ suffix_nodes[suffix] = theNode
+ saved_hashes[suffix] = theNode.get_csig()
+
+ if Verbose:
+ print "hashes: ",saved_hashes
+
+ must_rerun_latex = True
+
+ #
+ # routine to update MD5 hash and compare
+ #
+ def check_MD5(filenode, suffix, saved_hashes=saved_hashes):
+ global must_rerun_latex
+ # two calls to clear old csig
+ filenode.clear_memoized_values()
+ filenode.ninfo = filenode.new_ninfo()
+ new_md5 = filenode.get_csig()
+
+ if saved_hashes[suffix] == new_md5:
+ if Verbose:
+ print "file %s not changed" % (targetbase+suffix)
+ return False # unchanged
+ saved_hashes[suffix] = new_md5
+ must_rerun_latex = True
+ if Verbose:
+ print "file %s changed, rerunning Latex, new hash = " % (targetbase+suffix), new_md5
+ return True # changed
- if must_rerun_latex == 1:
- result = XXXLaTeXAction(target, source, env)
- if result != 0:
- return result
+ # generate the file name that latex will generate
+ resultfilename = targetbase + callerSuffix
- # Now decide if latex needs to be run yet again to resolve warnings.
- logfilename = targetbase + '.log'
- for _ in range(int(env.subst('$LATEXRETRIES'))):
- if not os.path.exists(logfilename):
- break
- content = open(logfilename, "rb").read()
- if not warning_rerun_re.search(content) and \
- not rerun_citations_re.search(content) and \
- not undefined_references_re.search(content):
- break
+ count = 0
+
+ while (must_rerun_latex and count < int(env.subst('$LATEXRETRIES'))) :
result = XXXLaTeXAction(target, source, env)
if result != 0:
return result
+ count = count + 1
+
+ must_rerun_latex = False
+ # Decide if various things need to be run, or run again.
+
+ # Read the log file to find all .aux files
+ logfilename = targetbase + '.log'
+ logContent = ''
+ auxfiles = []
+ if os.path.exists(logfilename):
+ logContent = open(logfilename, "rb").read()
+ auxfiles = openout_aux_re.findall(logContent)
+
+ # Now decide if bibtex will need to be run.
+ # The information that bibtex reads from the .aux file is
+ # pass-independent. If we find (below) that the .bbl file is unchanged,
+ # then the last latex saw a correct bibliography.
+ # Therefore only do this on the first pass
+ if count == 1:
+ for auxfilename in auxfiles:
+ target_aux = os.path.join(targetdir, auxfilename)
+ if os.path.exists(target_aux):
+ content = open(target_aux, "rb").read()
+ if string.find(content, "bibdata") != -1:
+ if Verbose:
+ print "Need to run bibtex"
+ bibfile = env.fs.File(targetbase)
+ result = BibTeXAction(bibfile, bibfile, env)
+ if result != 0:
+ return result
+ must_rerun_latex = check_MD5(suffix_nodes['.bbl'],'.bbl')
+ break
+
+ # Now decide if latex will need to be run again due to index.
+ if check_MD5(suffix_nodes['.idx'],'.idx') or (count == 1 and run_makeindex):
+ # We must run makeindex
+ if Verbose:
+ print "Need to run makeindex"
+ idxfile = suffix_nodes['.idx']
+ result = MakeIndexAction(idxfile, idxfile, env)
+ if result != 0:
+ return result
+
+ # TO-DO: need to add a way for the user to extend this list for whatever
+ # auxiliary files they create in other (or their own) packages
+ # Harder is case is where an action needs to be called -- that should be rare (I hope?)
+
+ for index in check_suffixes:
+ check_MD5(suffix_nodes[index],index)
+
+ # Now decide if latex will need to be run again due to nomenclature.
+ if check_MD5(suffix_nodes['.nlo'],'.nlo') or (count == 1 and run_nomenclature):
+ # We must run makeindex
+ if Verbose:
+ print "Need to run makeindex for nomenclature"
+ nclfile = suffix_nodes['.nlo']
+ result = MakeNclAction(nclfile, nclfile, env)
+ if result != 0:
+ return result
+
+ # Now decide if latex will need to be run again due to glossary.
+ if check_MD5(suffix_nodes['.glo'],'.glo') or (count == 1 and run_glossary):
+ # We must run makeindex
+ if Verbose:
+ print "Need to run makeindex for glossary"
+ glofile = suffix_nodes['.glo']
+ result = MakeGlossaryAction(glofile, glofile, env)
+ if result != 0:
+ return result
+
+ # Now decide if latex needs to be run yet again to resolve warnings.
+ if warning_rerun_re.search(logContent):
+ must_rerun_latex = True
+ if Verbose:
+ print "rerun Latex due to latex or package rerun warning"
+
+ if rerun_citations_re.search(logContent):
+ must_rerun_latex = True
+ if Verbose:
+ print "rerun Latex due to 'Rerun to get citations correct' warning"
+
+ if undefined_references_re.search(logContent):
+ must_rerun_latex = True
+ if Verbose:
+ print "rerun Latex due to undefined references or citations"
+
+ if (count >= int(env.subst('$LATEXRETRIES')) and must_rerun_latex):
+ print "reached max number of retries on Latex ,",int(env.subst('$LATEXRETRIES'))
+# end of while loop
+
# rename Latex's output to what the target name is
if not (str(target[0]) == resultfilename and os.path.exists(resultfilename)):
if os.path.exists(resultfilename):
print "move %s to %s" % (resultfilename, str(target[0]), )
shutil.move(resultfilename,str(target[0]))
- # if the user gave some other extension try PDFSUFFIX and then .dvi
- # not sure how to tell if we got here from a PDF or DVI builder.
- else:
- resultfilename = os.path.splitext(resultfilename)[0] + callerSuffix
- if os.path.exists(resultfilename):
- print "move %s to %s" % (resultfilename, str(target[0]), )
- shutil.move(resultfilename,str(target[0]))
-
- env['ENV']['TEXINPUTS'] = texinputs_save
- env['ENV']['BIBINPUTS'] = bibinputs_save
- env['ENV']['BSTINPUTS'] = bibinputs_save
+ # Original comment (when TEXPICTS was not restored):
# The TEXPICTS enviroment variable is needed by a dvi -> pdf step
- # later on Mac OSX so leave it,
- # env['ENV']['TEXPICTS'] = texpicts_save
+ # later on Mac OSX so leave it
+ #
+ # It is also used when searching for pictures (implicit dependencies).
+ # Why not set the variable again in the respective builder instead
+ # of leaving local modifications in the environment? What if multiple
+ # latex builds in different directories need different TEXPICTS?
+ for var in SCons.Scanner.LaTeX.LaTeX.env_variables:
+ if var == 'TEXPICTS':
+ continue
+ if saved_env[var] is _null:
+ try:
+ del env['ENV'][var]
+ except KeyError:
+ pass # was never set
+ else:
+ env['ENV'][var] = saved_env[var]
return result
@@ -262,42 +387,69 @@ def TeXLaTeXStrFunction(target = None, source= None, env=None):
return result
def tex_emitter(target, source, env):
- base = SCons.Util.splitext(str(source[0]))[0]
+ """An emitter for TeX and LaTeX sources.
+ For LaTeX sources we try and find the common created files that
+ are needed on subsequent runs of latex to finish tables of contents,
+ bibliographies, indices, lists of figures, and hyperlink references.
+ """
targetbase = SCons.Util.splitext(str(target[0]))[0]
+ basename = SCons.Util.splitext(str(source[0]))[0]
+ basefile = os.path.split(str(basename))[1]
+
+ basedir = os.path.split(str(source[0]))[0]
+ abspath = os.path.abspath(basedir)
+ target[0].attributes.path = abspath
- target.append(targetbase + '.aux')
- env.Precious(targetbase + '.aux')
- target.append(targetbase + '.log')
- for f in source:
- content = f.get_contents()
- if tableofcontents_re.search(content):
- target.append(targetbase + '.toc')
- env.Precious(targetbase + '.toc')
- if makeindex_re.search(content):
- target.append(targetbase + '.ilg')
- target.append(targetbase + '.ind')
- target.append(targetbase + '.idx')
- env.Precious(targetbase + '.idx')
- if bibliography_re.search(content):
- target.append(targetbase + '.bbl')
- env.Precious(targetbase + '.bbl')
- target.append(targetbase + '.blg')
-
- # read log file to get all .aux files
+ #
+ # file names we will make use of in searching the sources and log file
+ #
+ emit_suffixes = ['.aux', '.log', '.ilg', '.blg', '.nls', '.nlg', '.gls', '.glg'] + all_suffixes
+ auxfilename = targetbase + '.aux'
logfilename = targetbase + '.log'
- dir, base_nodir = os.path.split(targetbase)
+
+ env.SideEffect(auxfilename,target[0])
+ env.SideEffect(logfilename,target[0])
+ env.Clean(target[0],auxfilename)
+ env.Clean(target[0],logfilename)
+
+ content = source[0].get_contents()
+ idx_exists = os.path.exists(targetbase + '.idx')
+ nlo_exists = os.path.exists(targetbase + '.nlo')
+ glo_exists = os.path.exists(targetbase + '.glo')
+
+ file_tests = [(auxfile_re.search(content),['.aux']),
+ (makeindex_re.search(content) or idx_exists,['.idx', '.ind', '.ilg']),
+ (bibliography_re.search(content),['.bbl', '.blg']),
+ (tableofcontents_re.search(content),['.toc']),
+ (listoffigures_re.search(content),['.lof']),
+ (listoftables_re.search(content),['.lot']),
+ (hyperref_re.search(content),['.out']),
+ (makenomenclature_re.search(content) or nlo_exists,['.nlo', '.nls', '.nlg']),
+ (makeglossary_re.search(content) or glo_exists,['.glo', '.gls', '.glg']),
+ (beamer_re.search(content),['.nav', '.snm', '.out', '.toc']) ]
+ # Note we add the various makeindex files if the file produced by latex exists (.idx, .glo, .nlo)
+ # This covers the case where the \makeindex, \makenomenclature, or \makeglossary
+ # is not in the main file but we want to clean the files and those made by makeindex
+
+ # TO-DO: need to add a way for the user to extend this list for whatever
+ # auxiliary files they create in other (or their own) packages
+
+ for (theSearch,suffix_list) in file_tests:
+ if theSearch:
+ for suffix in suffix_list:
+ env.SideEffect(targetbase + suffix,target[0])
+ env.Clean(target[0],targetbase + suffix)
+
+ # read log file to get all other files that latex creates and will read on the next pass
if os.path.exists(logfilename):
content = open(logfilename, "rb").read()
out_files = openout_re.findall(content)
- out_files = filter(lambda f, b=base_nodir+'.aux': f != b, out_files)
- if dir != '':
- out_files = map(lambda f, d=dir: d+os.sep+f, out_files)
- target.extend(out_files)
- for f in out_files:
- env.Precious( f )
+ env.SideEffect(out_files,target[0])
+ env.Clean(target[0],out_files)
return (target, source)
+
TeXLaTeXAction = None
def generate(env):
@@ -324,6 +476,16 @@ def generate(env):
if MakeIndexAction is None:
MakeIndexAction = SCons.Action.Action("$MAKEINDEXCOM", "$MAKEINDEXCOMSTR")
+ # Define an action to run MakeIndex on a file for nomenclatures.
+ global MakeNclAction
+ if MakeNclAction is None:
+ MakeNclAction = SCons.Action.Action("$MAKENCLCOM", "$MAKENCLCOMSTR")
+
+ # Define an action to run MakeIndex on a file for glossaries.
+ global MakeGlossaryAction
+ if MakeGlossaryAction is None:
+ MakeGlossaryAction = SCons.Action.Action("$MAKEGLOSSARYCOM", "$MAKEGLOSSARYCOMSTR")
+
global TeXLaTeXAction
if TeXLaTeXAction is None:
TeXLaTeXAction = SCons.Action.Action(TeXLaTeXFunction,
@@ -354,5 +516,20 @@ def generate(env):
env['MAKEINDEXFLAGS'] = SCons.Util.CLVar('')
env['MAKEINDEXCOM'] = 'cd ${TARGET.dir} && $MAKEINDEX $MAKEINDEXFLAGS ${SOURCE.file}'
+ env['MAKEGLOSSARY'] = 'makeindex'
+ env['MAKEGLOSSARYSTYLE'] = '${SOURCE.filebase}.ist'
+ env['MAKEGLOSSARYFLAGS'] = SCons.Util.CLVar('-s ${MAKEGLOSSARYSTYLE} -t ${SOURCE.filebase}.glg')
+ env['MAKEGLOSSARYCOM'] = 'cd ${TARGET.dir} && $MAKEGLOSSARY ${SOURCE.filebase}.glo $MAKEGLOSSARYFLAGS -o ${SOURCE.filebase}.gls'
+
+ env['MAKENCL'] = 'makeindex'
+ env['MAKENCLSTYLE'] = '$nomencl.ist'
+ env['MAKENCLFLAGS'] = '-s ${MAKENCLSTYLE} -t ${SOURCE.filebase}.nlg'
+ env['MAKENCLCOM'] = 'cd ${TARGET.dir} && $MAKENCL ${SOURCE.filebase}.nlo $MAKENCLFLAGS -o ${SOURCE.filebase}.nls'
+
+ # Duplicate from pdflatex.py. If latex.py goes away, then this is still OK.
+ env['PDFLATEX'] = 'pdflatex'
+ env['PDFLATEXFLAGS'] = SCons.Util.CLVar('-interaction=nonstopmode')
+ env['PDFLATEXCOM'] = 'cd ${TARGET.dir} && $PDFLATEX $PDFLATEXFLAGS ${SOURCE.file}'
+
def exists(env):
return env.Detect('tex')
diff --git a/third_party/scons/scons-local/SCons/Tool/tlib.py b/third_party/scons/scons-local/SCons/Tool/tlib.py
index 760e87cf..c41e23c 100644
--- a/third_party/scons/scons-local/SCons/Tool/tlib.py
+++ b/third_party/scons/scons-local/SCons/Tool/tlib.py
@@ -27,7 +27,7 @@ XXX
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/tlib.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/tlib.py 3603 2008/10/10 05:46:45 scons"
import SCons.Tool
import SCons.Tool.bcc32
diff --git a/third_party/scons/scons-local/SCons/Tool/wix.py b/third_party/scons/scons-local/SCons/Tool/wix.py
index ac8984f..5802bdb 100644
--- a/third_party/scons/scons-local/SCons/Tool/wix.py
+++ b/third_party/scons/scons-local/SCons/Tool/wix.py
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/wix.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/wix.py 3603 2008/10/10 05:46:45 scons"
import SCons.Builder
import SCons.Action
diff --git a/third_party/scons/scons-local/SCons/Tool/yacc.py b/third_party/scons/scons-local/SCons/Tool/yacc.py
index 154c339..c1ae31c 100644
--- a/third_party/scons/scons-local/SCons/Tool/yacc.py
+++ b/third_party/scons/scons-local/SCons/Tool/yacc.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/yacc.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/yacc.py 3603 2008/10/10 05:46:45 scons"
import os.path
import string
diff --git a/third_party/scons/scons-local/SCons/Tool/zip.py b/third_party/scons/scons-local/SCons/Tool/zip.py
index dd8b575..b57b331 100644
--- a/third_party/scons/scons-local/SCons/Tool/zip.py
+++ b/third_party/scons/scons-local/SCons/Tool/zip.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/zip.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/zip.py 3603 2008/10/10 05:46:45 scons"
import os.path
diff --git a/third_party/scons/scons-local/SCons/Util.py b/third_party/scons/scons-local/SCons/Util.py
index d194d25..ead3c2d 100644
--- a/third_party/scons/scons-local/SCons/Util.py
+++ b/third_party/scons/scons-local/SCons/Util.py
@@ -27,7 +27,7 @@ Various utility functions go here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Util.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Util.py 3603 2008/10/10 05:46:45 scons"
import copy
import os
@@ -844,7 +844,7 @@ else:
continue
return None
-def PrependPath(oldpath, newpath, sep = os.pathsep):
+def PrependPath(oldpath, newpath, sep = os.pathsep, delete_existing=1):
"""This prepends newpath elements to the given oldpath. Will only
add any particular path once (leaving the first one it encounters
and ignoring the rest, to preserve path order), and will
@@ -857,6 +857,10 @@ def PrependPath(oldpath, newpath, sep = os.pathsep):
Old Path: "/foo/bar:/foo"
New Path: "/biz/boom:/foo"
Result: "/biz/boom:/foo:/foo/bar"
+
+ If delete_existing is 0, then adding a path that exists will
+ not move it to the beginning; it will stay where it is in the
+ list.
"""
orig = oldpath
@@ -871,23 +875,49 @@ def PrependPath(oldpath, newpath, sep = os.pathsep):
else:
newpaths = string.split(newpath, sep)
- newpaths = newpaths + paths # prepend new paths
+ if not delete_existing:
+ # First uniquify the old paths, making sure to
+ # preserve the first instance (in Unix/Linux,
+ # the first one wins), and remembering them in normpaths.
+ # Then insert the new paths at the head of the list
+ # if they're not already in the normpaths list.
+ result = []
+ normpaths = []
+ for path in paths:
+ if not path:
+ continue
+ normpath = os.path.normpath(os.path.normcase(path))
+ if normpath not in normpaths:
+ result.append(path)
+ normpaths.append(normpath)
+ newpaths.reverse() # since we're inserting at the head
+ for path in newpaths:
+ if not path:
+ continue
+ normpath = os.path.normpath(os.path.normcase(path))
+ if normpath not in normpaths:
+ result.insert(0, path)
+ normpaths.append(normpath)
+ paths = result
+
+ else:
+ newpaths = newpaths + paths # prepend new paths
- normpaths = []
- paths = []
- # now we add them only if they are unique
- for path in newpaths:
- normpath = os.path.normpath(os.path.normcase(path))
- if path and not normpath in normpaths:
- paths.append(path)
- normpaths.append(normpath)
+ normpaths = []
+ paths = []
+ # now we add them only if they are unique
+ for path in newpaths:
+ normpath = os.path.normpath(os.path.normcase(path))
+ if path and not normpath in normpaths:
+ paths.append(path)
+ normpaths.append(normpath)
if is_list:
return paths
else:
return string.join(paths, sep)
-def AppendPath(oldpath, newpath, sep = os.pathsep):
+def AppendPath(oldpath, newpath, sep = os.pathsep, delete_existing=1):
"""This appends new path elements to the given old path. Will
only add any particular path once (leaving the last one it
encounters and ignoring the rest, to preserve path order), and
@@ -900,6 +930,9 @@ def AppendPath(oldpath, newpath, sep = os.pathsep):
Old Path: "/foo/bar:/foo"
New Path: "/biz/boom:/foo"
Result: "/foo/bar:/biz/boom:/foo"
+
+ If delete_existing is 0, then adding a path that exists
+ will not move it to the end; it will stay where it is in the list.
"""
orig = oldpath
@@ -914,19 +947,42 @@ def AppendPath(oldpath, newpath, sep = os.pathsep):
else:
newpaths = string.split(newpath, sep)
- newpaths = paths + newpaths # append new paths
- newpaths.reverse()
-
- normpaths = []
- paths = []
- # now we add them only of they are unique
- for path in newpaths:
- normpath = os.path.normpath(os.path.normcase(path))
- if path and not normpath in normpaths:
- paths.append(path)
- normpaths.append(normpath)
-
- paths.reverse()
+ if not delete_existing:
+ # add old paths to result, then
+ # add new paths if not already present
+ # (I thought about using a dict for normpaths for speed,
+ # but it's not clear hashing the strings would be faster
+ # than linear searching these typically short lists.)
+ result = []
+ normpaths = []
+ for path in paths:
+ if not path:
+ continue
+ result.append(path)
+ normpaths.append(os.path.normpath(os.path.normcase(path)))
+ for path in newpaths:
+ if not path:
+ continue
+ normpath = os.path.normpath(os.path.normcase(path))
+ if normpath not in normpaths:
+ result.append(path)
+ normpaths.append(normpath)
+ paths = result
+ else:
+ # start w/ new paths, add old ones if not present,
+ # then reverse.
+ newpaths = paths + newpaths # append new paths
+ newpaths.reverse()
+
+ normpaths = []
+ paths = []
+ # now we add them only if they are unique
+ for path in newpaths:
+ normpath = os.path.normpath(os.path.normcase(path))
+ if path and not normpath in normpaths:
+ paths.append(path)
+ normpaths.append(normpath)
+ paths.reverse()
if is_list:
return paths
@@ -1440,6 +1496,12 @@ md5 = False
def MD5signature(s):
return str(s)
+def MD5filesignature(fname, chunksize=65536):
+ f = open(fname, "rb")
+ result = f.read()
+ f.close()
+ return result
+
try:
import hashlib
except ImportError:
@@ -1452,6 +1514,17 @@ else:
m.update(str(s))
return m.hexdigest()
+ def MD5filesignature(fname, chunksize=65536):
+ m = hashlib.md5()
+ f = open(fname, "rb")
+ while 1:
+ blck = f.read(chunksize)
+ if not blck:
+ break
+ m.update(str(blck))
+ f.close()
+ return m.hexdigest()
+
def MD5collect(signatures):
"""
Collects a list of signatures into an aggregate signature.
diff --git a/third_party/scons/scons-local/SCons/Variables/BoolVariable.py b/third_party/scons/scons-local/SCons/Variables/BoolVariable.py
index f89f31c..dd11f55 100644
--- a/third_party/scons/scons-local/SCons/Variables/BoolVariable.py
+++ b/third_party/scons/scons-local/SCons/Variables/BoolVariable.py
@@ -34,7 +34,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/BoolVariable.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Variables/BoolVariable.py 3603 2008/10/10 05:46:45 scons"
__all__ = ['BoolVariable',]
diff --git a/third_party/scons/scons-local/SCons/Variables/EnumVariable.py b/third_party/scons/scons-local/SCons/Variables/EnumVariable.py
index 8058c10..d7ad21b 100644
--- a/third_party/scons/scons-local/SCons/Variables/EnumVariable.py
+++ b/third_party/scons/scons-local/SCons/Variables/EnumVariable.py
@@ -37,7 +37,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/EnumVariable.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Variables/EnumVariable.py 3603 2008/10/10 05:46:45 scons"
__all__ = ['EnumVariable',]
diff --git a/third_party/scons/scons-local/SCons/Variables/ListVariable.py b/third_party/scons/scons-local/SCons/Variables/ListVariable.py
index dc60fa5..4dcaa1c9 100644
--- a/third_party/scons/scons-local/SCons/Variables/ListVariable.py
+++ b/third_party/scons/scons-local/SCons/Variables/ListVariable.py
@@ -47,7 +47,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/ListVariable.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Variables/ListVariable.py 3603 2008/10/10 05:46:45 scons"
# Know Bug: This should behave like a Set-Type, but does not really,
# since elements can occur twice.
diff --git a/third_party/scons/scons-local/SCons/Variables/PackageVariable.py b/third_party/scons/scons-local/SCons/Variables/PackageVariable.py
index e53f05b..e0da2e6 100644
--- a/third_party/scons/scons-local/SCons/Variables/PackageVariable.py
+++ b/third_party/scons/scons-local/SCons/Variables/PackageVariable.py
@@ -50,7 +50,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/PackageVariable.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Variables/PackageVariable.py 3603 2008/10/10 05:46:45 scons"
__all__ = ['PackageVariable',]
diff --git a/third_party/scons/scons-local/SCons/Variables/PathVariable.py b/third_party/scons/scons-local/SCons/Variables/PathVariable.py
index f97167c..298eadf 100644
--- a/third_party/scons/scons-local/SCons/Variables/PathVariable.py
+++ b/third_party/scons/scons-local/SCons/Variables/PathVariable.py
@@ -68,7 +68,7 @@ Usage example:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/PathVariable.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Variables/PathVariable.py 3603 2008/10/10 05:46:45 scons"
__all__ = ['PathVariable',]
diff --git a/third_party/scons/scons-local/SCons/Variables/__init__.py b/third_party/scons/scons-local/SCons/Variables/__init__.py
index 7ee30a1..c16cb07 100644
--- a/third_party/scons/scons-local/SCons/Variables/__init__.py
+++ b/third_party/scons/scons-local/SCons/Variables/__init__.py
@@ -27,7 +27,7 @@ customizable variables to an SCons build.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Variables/__init__.py 3603 2008/10/10 05:46:45 scons"
import os.path
import string
diff --git a/third_party/scons/scons-local/SCons/Warnings.py b/third_party/scons/scons-local/SCons/Warnings.py
index fadd72f..f052b0ea 100644
--- a/third_party/scons/scons-local/SCons/Warnings.py
+++ b/third_party/scons/scons-local/SCons/Warnings.py
@@ -27,7 +27,7 @@ This file implements the warnings framework for SCons.
"""
-__revision__ = "src/engine/SCons/Warnings.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Warnings.py 3603 2008/10/10 05:46:45 scons"
import string
import sys
diff --git a/third_party/scons/scons-local/SCons/__init__.py b/third_party/scons/scons-local/SCons/__init__.py
index ca7dd6b..96142d2 100644
--- a/third_party/scons/scons-local/SCons/__init__.py
+++ b/third_party/scons/scons-local/SCons/__init__.py
@@ -27,15 +27,15 @@ The main package for the SCons software construction utility.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/__init__.py 3603 2008/10/10 05:46:45 scons"
-__version__ = "1.0.1.d20080915"
+__version__ = "1.1.0"
-__build__ = "r3424"
+__build__ = "r3603"
__buildsys__ = "scons-dev"
-__date__ = "2008/09/15 11:22:20"
+__date__ = "2008/10/10 05:46:45"
__developer__ = "scons"
diff --git a/third_party/scons/scons-local/SCons/compat/__init__.py b/third_party/scons/scons-local/SCons/compat/__init__.py
index e7eddc8..17a0b10 100644
--- a/third_party/scons/scons-local/SCons/compat/__init__.py
+++ b/third_party/scons/scons-local/SCons/compat/__init__.py
@@ -60,7 +60,7 @@ function defined below loads the module as the "real" name (without the
rest of our code will find our pre-loaded compatibility module.
"""
-__revision__ = "src/engine/SCons/compat/__init__.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/compat/__init__.py 3603 2008/10/10 05:46:45 scons"
def import_as(module, name):
"""
@@ -168,6 +168,46 @@ except AttributeError:
del shlex
import_as('_scons_shlex', 'shlex')
+
+import shutil
+try:
+ shutil.move
+except AttributeError:
+ # Pre-2.3 Python has no shutil.move() function.
+ #
+ # Cribbed from Python 2.5.
+ import os
+
+ def move(src, dst):
+ """Recursively move a file or directory to another location.
+
+ If the destination is on our current filesystem, then simply use
+ rename. Otherwise, copy src to the dst and then remove src.
+ A lot more could be done here... A look at a mv.c shows a lot of
+ the issues this implementation glosses over.
+
+ """
+ try:
+ os.rename(src, dst)
+ except OSError:
+ if os.path.isdir(src):
+ if shutil.destinsrc(src, dst):
+ raise Error, "Cannot move a directory '%s' into itself '%s'." % (src, dst)
+ shutil.copytree(src, dst, symlinks=True)
+ shutil.rmtree(src)
+ else:
+ shutil.copy2(src,dst)
+ os.unlink(src)
+ shutil.move = move
+ del move
+
+ def destinsrc(src, dst):
+ src = os.path.abspath(src)
+ return os.path.abspath(dst)[:len(src)] == src
+ shutil.destinsrc = destinsrc
+ del destinsrc
+
+
try:
import subprocess
except ImportError:
diff --git a/third_party/scons/scons-local/SCons/compat/_scons_UserString.py b/third_party/scons/scons-local/SCons/compat/_scons_UserString.py
index 222cf7a..0ff1cad 100644
--- a/third_party/scons/scons-local/SCons/compat/_scons_UserString.py
+++ b/third_party/scons/scons-local/SCons/compat/_scons_UserString.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/compat/_scons_UserString.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/compat/_scons_UserString.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """
A user-defined wrapper around string objects
diff --git a/third_party/scons/scons-local/SCons/compat/_scons_hashlib.py b/third_party/scons/scons-local/SCons/compat/_scons_hashlib.py
index a85451b..cd2f756 100644
--- a/third_party/scons/scons-local/SCons/compat/_scons_hashlib.py
+++ b/third_party/scons/scons-local/SCons/compat/_scons_hashlib.py
@@ -31,7 +31,7 @@ purposes, anyway). In fact, this module will raise an ImportError if
the underlying md5 module isn't available.
"""
-__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 3603 2008/10/10 05:46:45 scons"
import md5
import string
diff --git a/third_party/scons/scons-local/SCons/compat/_scons_itertools.py b/third_party/scons/scons-local/SCons/compat/_scons_itertools.py
index c99b2e79..a0e6c94 100644
--- a/third_party/scons/scons-local/SCons/compat/_scons_itertools.py
+++ b/third_party/scons/scons-local/SCons/compat/_scons_itertools.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/compat/_scons_itertools.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/compat/_scons_itertools.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """
Implementations of itertools functions for Python versions that don't
diff --git a/third_party/scons/scons-local/SCons/compat/builtins.py b/third_party/scons/scons-local/SCons/compat/builtins.py
index e4ddd3e..5cf21e2 100644
--- a/third_party/scons/scons-local/SCons/compat/builtins.py
+++ b/third_party/scons/scons-local/SCons/compat/builtins.py
@@ -55,7 +55,7 @@ the FUNCTIONS or DATA output, that means those names are already built in
to this version of Python and we don't need to add them from this module.
"""
-__revision__ = "src/engine/SCons/compat/builtins.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/compat/builtins.py 3603 2008/10/10 05:46:45 scons"
import __builtin__
@@ -135,6 +135,12 @@ except NameError:
# Assign to True in this module namespace so it shows up in pydoc output.
True = True
+try:
+ file
+except NameError:
+ # Pre-2.2 Python has no file() function.
+ __builtin__.file = open
+
#
try:
zip
diff --git a/third_party/scons/scons-local/SCons/cpp.py b/third_party/scons/scons-local/SCons/cpp.py
index f059b14..9b5b5b1 100644
--- a/third_party/scons/scons-local/SCons/cpp.py
+++ b/third_party/scons/scons-local/SCons/cpp.py
@@ -21,12 +21,17 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/cpp.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/cpp.py 3603 2008/10/10 05:46:45 scons"
__doc__ = """
SCons C Pre-Processor module
"""
+# TODO(1.5): remove this import
+# This module doesn't use anything from SCons by name, but we import SCons
+# here to pull in zip() from the SCons.compat layer for early Pythons.
+import SCons
+
import os
import re
import string
diff --git a/third_party/scons/scons-local/SCons/exitfuncs.py b/third_party/scons/scons-local/SCons/exitfuncs.py
index 92515f8..db4f40f 100644
--- a/third_party/scons/scons-local/SCons/exitfuncs.py
+++ b/third_party/scons/scons-local/SCons/exitfuncs.py
@@ -27,7 +27,7 @@ Register functions which are executed when SCons exits for any reason.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/exitfuncs.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/exitfuncs.py 3603 2008/10/10 05:46:45 scons"
diff --git a/third_party/scons/scons-time.py b/third_party/scons/scons-time.py
index 3bc195a..5de27ff 100644
--- a/third_party/scons/scons-time.py
+++ b/third_party/scons/scons-time.py
@@ -33,7 +33,7 @@
from __future__ import nested_scopes
-__revision__ = "src/script/scons-time.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/script/scons-time.py 3603 2008/10/10 05:46:45 scons"
import getopt
import glob
diff --git a/third_party/scons/scons.py b/third_party/scons/scons.py
index 6456add..ef1198d 100755
--- a/third_party/scons/scons.py
+++ b/third_party/scons/scons.py
@@ -24,15 +24,15 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/script/scons.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/script/scons.py 3603 2008/10/10 05:46:45 scons"
-__version__ = "1.0.1.d20080915"
+__version__ = "1.1.0"
-__build__ = "r3424"
+__build__ = "r3603"
__buildsys__ = "scons-dev"
-__date__ = "2008/09/15 11:22:20"
+__date__ = "2008/10/10 05:46:45"
__developer__ = "scons"
diff --git a/third_party/scons/sconsign.py b/third_party/scons/sconsign.py
index 6892ffb..3532175 100644
--- a/third_party/scons/sconsign.py
+++ b/third_party/scons/sconsign.py
@@ -24,15 +24,15 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/script/sconsign.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/script/sconsign.py 3603 2008/10/10 05:46:45 scons"
-__version__ = "1.0.1.d20080915"
+__version__ = "1.1.0"
-__build__ = "r3424"
+__build__ = "r3603"
__buildsys__ = "scons-dev"
-__date__ = "2008/09/15 11:22:20"
+__date__ = "2008/10/10 05:46:45"
__developer__ = "scons"