diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-03 20:15:56 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-03 20:15:56 +0000 |
commit | 8536dcada5501d93a684f00a9a6bf831abc81ef5 (patch) | |
tree | 9b5fecdefeb3f6ab03b001e00c412aedcf091927 | |
parent | 728947148e8cade7ee8077e9451d20e18cc050ed (diff) | |
download | chromium_src-8536dcada5501d93a684f00a9a6bf831abc81ef5.zip chromium_src-8536dcada5501d93a684f00a9a6bf831abc81ef5.tar.gz chromium_src-8536dcada5501d93a684f00a9a6bf831abc81ef5.tar.bz2 |
Update SCons to latest checkpoint release, 1.2.0.d20090113.
Key new features include support for batch compilation (directly
supported for Visual C/C++) and ${UN,}CHANGED_{SOURCES,TARGETS} variables.
Review URL: http://codereview.chromium.org/20025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9101 0039d316-1c4b-4281-b951-d872f2087c98
175 files changed, 1312 insertions, 708 deletions
diff --git a/third_party/scons/README.chromium b/third_party/scons/README.chromium index ae5824f..2d2fbc2 100644 --- a/third_party/scons/README.chromium +++ b/third_party/scons/README.chromium @@ -1,7 +1,7 @@ This is a copy of SCons, a Python-based software build tool (that is, replacement for Make) that we use for cross-platform builds. -Current version: 1.2.0 +Current version: 1.2.0.d20090113 Originally obtained from: @@ -34,6 +34,6 @@ To import a new version of SCons: $ cp -rf scons-local-{VERSION}/* scons-local $ rm -rf scons-local-{VERSION} -- Update this README.google file to reflect the new version number. +- Update this README.chromium file to reflect the new version number. - Check in (after appropriate testing, of course). diff --git a/third_party/scons/scons-LICENSE b/third_party/scons/scons-LICENSE index 804ed86..4ac2352 100644 --- a/third_party/scons/scons-LICENSE +++ b/third_party/scons/scons-LICENSE @@ -3,7 +3,7 @@ This copyright and license do not apply to any other software with which this software may have been included. -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/third_party/scons/scons-README b/third_party/scons/scons-README index 298a221..89bc634 100644 --- a/third_party/scons/scons-README +++ b/third_party/scons/scons-README @@ -1,4 +1,4 @@ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation SCons - a software construction tool diff --git a/third_party/scons/scons-local/SCons/Action.py b/third_party/scons/scons-local/SCons/Action.py index d740de6..29b3cbc 100644 --- a/third_party/scons/scons-local/SCons/Action.py +++ b/third_party/scons/scons-local/SCons/Action.py @@ -76,7 +76,7 @@ way for wrapping up the functions. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -97,7 +97,7 @@ way for wrapping up the functions. # 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/Action.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Action.py 3897 2009/01/13 06:45:54 scons" import cPickle import dis @@ -392,7 +392,7 @@ def _do_create_list_action(act, kw): aa = _do_create_action(a, kw) if aa is not None: acts.append(aa) if not acts: - return None + return ListAction([]) elif len(acts) == 1: return acts[0] else: @@ -414,6 +414,11 @@ class ActionBase: def __cmp__(self, other): return cmp(self.__dict__, other) + def no_batch_key(self, env, target, source): + return None + + batch_key = no_batch_key + def genstring(self, target, source, env): return str(self) @@ -446,15 +451,18 @@ class ActionBase: self.presub_env = None # don't need this any more return lines - def get_executor(self, env, overrides, tlist, slist, executor_kw): - """Return the Executor for this Action.""" - return SCons.Executor.Executor(self, env, overrides, - tlist, slist, executor_kw) + def get_targets(self, env, executor): + """ + Returns the type of targets ($TARGETS, $CHANGED_TARGETS) used + by this action. + """ + return self.targets class _ActionAction(ActionBase): """Base class for actions that create output objects.""" def __init__(self, cmdstr=_null, strfunction=_null, varlist=(), presub=_null, chdir=None, exitstatfunc=None, + batch_key=None, targets='$TARGETS', **kw): self.cmdstr = cmdstr if strfunction is not _null: @@ -469,6 +477,19 @@ class _ActionAction(ActionBase): exitstatfunc = default_exitstatfunc self.exitstatfunc = exitstatfunc + self.targets = targets + + if batch_key: + if not callable(batch_key): + # They have set batch_key, but not to their own + # callable. The default behavior here will batch + # *all* targets+sources using this action, separated + # for each construction environment. + def default_batch_key(self, env, target, source): + return (id(self), id(env)) + batch_key = default_batch_key + SCons.Util.AddMethod(self, batch_key, 'batch_key') + def print_cmd_line(self, s, target, source, env): sys.stdout.write(s + "\n") @@ -477,7 +498,8 @@ class _ActionAction(ActionBase): presub=_null, show=_null, execute=_null, - chdir=_null): + chdir=_null, + executor=None): if not is_List(target): target = [target] if not is_List(source): @@ -498,15 +520,27 @@ class _ActionAction(ActionBase): chdir = str(chdir.abspath) except AttributeError: if not is_String(chdir): - chdir = str(target[0].dir) + if executor: + chdir = str(executor.batches[0].targets[0].dir) + else: + chdir = str(target[0].dir) if presub: + if executor: + target = executor.get_all_targets() + source = executor.get_all_sources() t = string.join(map(str, target), ' and ') l = string.join(self.presub_lines(env), '\n ') out = "Building %s with action:\n %s\n" % (t, l) sys.stdout.write(out) cmd = None if show and self.strfunction: - cmd = self.strfunction(target, source, env) + if executor: + target = executor.get_all_targets() + source = executor.get_all_sources() + try: + cmd = self.strfunction(target, source, env, executor) + except TypeError: + cmd = self.strfunction(target, source, env) if cmd: if chdir: cmd = ('os.chdir(%s)\n' % repr(chdir)) + cmd @@ -524,7 +558,7 @@ class _ActionAction(ActionBase): if chdir: os.chdir(chdir) try: - stat = self.execute(target, source, env) + stat = self.execute(target, source, env, executor=executor) if isinstance(stat, SCons.Errors.BuildError): s = exitstatfunc(stat.status) if s: @@ -657,8 +691,11 @@ class CommandAction(_ActionAction): return string.join(map(str, self.cmd_list), ' ') return str(self.cmd_list) - def process(self, target, source, env): - result = env.subst_list(self.cmd_list, 0, target, source) + def process(self, target, source, env, executor=None): + if executor: + result = env.subst_list(self.cmd_list, 0, executor=executor) + else: + result = env.subst_list(self.cmd_list, 0, target, source) silent = None ignore = None while 1: @@ -675,20 +712,23 @@ class CommandAction(_ActionAction): pass return result, ignore, silent - def strfunction(self, target, source, env): + def strfunction(self, target, source, env, executor=None): if self.cmdstr is None: return None if self.cmdstr is not _null: from SCons.Subst import SUBST_RAW - c = env.subst(self.cmdstr, SUBST_RAW, target, source) + if executor: + c = env.subst(self.cmdstr, SUBST_RAW, executor=executor) + else: + c = env.subst(self.cmdstr, SUBST_RAW, target, source) if c: return c - cmd_list, ignore, silent = self.process(target, source, env) + cmd_list, ignore, silent = self.process(target, source, env, executor) if silent: return '' return _string_from_cmd_list(cmd_list[0]) - def execute(self, target, source, env): + def execute(self, target, source, env, executor=None): """Execute a command action. This will handle lists of commands as well as individual commands, @@ -733,7 +773,10 @@ class CommandAction(_ActionAction): # reasonable for just about everything else: ENV[key] = str(value) - cmd_list, ignore, silent = self.process(target, map(rfile, source), env) + if executor: + target = executor.get_all_targets() + source = executor.get_all_sources() + cmd_list, ignore, silent = self.process(target, map(rfile, source), env, executor) # Use len() to filter out any "command" that's zero-length. for cmd_line in filter(len, cmd_list): @@ -748,7 +791,7 @@ class CommandAction(_ActionAction): command=cmd_line) return 0 - def get_presig(self, target, source, env): + def get_presig(self, target, source, env, executor=None): """Return the signature contents of this action's command line. This strips $(-$) and everything in between the string, @@ -760,16 +803,22 @@ class CommandAction(_ActionAction): cmd = string.join(map(str, cmd)) else: cmd = str(cmd) - return env.subst_target_source(cmd, SUBST_SIG, target, source) + if executor: + return env.subst_target_source(cmd, SUBST_SIG, executor=executor) + else: + return env.subst_target_source(cmd, SUBST_SIG, target, source) - def get_implicit_deps(self, target, source, env): + def get_implicit_deps(self, target, source, env, executor=None): icd = env.get('IMPLICIT_COMMAND_DEPENDENCIES', True) if is_String(icd) and icd[:1] == '$': icd = env.subst(icd) if not icd or icd in ('0', 'None'): return [] from SCons.Subst import SUBST_SIG - cmd_list = env.subst_list(self.cmd_list, SUBST_SIG, target, source) + if executor: + cmd_list = env.subst_list(self.cmd_list, SUBST_SIG, executor=executor) + else: + cmd_list = env.subst_list(self.cmd_list, SUBST_SIG, target, source) res = [] for cmd_line in cmd_list: if cmd_line: @@ -785,14 +834,21 @@ class CommandGeneratorAction(ActionBase): self.generator = generator self.gen_kw = kw self.varlist = kw.get('varlist', ()) + self.targets = kw.get('targets', '$TARGETS') - def _generate(self, target, source, env, for_signature): + def _generate(self, target, source, env, for_signature, executor=None): # ensure that target is a list, to make it easier to write # generator functions: if not is_List(target): target = [target] - ret = self.generator(target=target, source=source, env=env, for_signature=for_signature) + if executor: + target = executor.get_all_targets() + source = executor.get_all_sources() + ret = self.generator(target=target, + source=source, + env=env, + for_signature=for_signature) #TODO(1.5) gen_cmd = Action(ret, **self.gen_kw) gen_cmd = apply(Action, (ret,), self.gen_kw) if not gen_cmd: @@ -809,25 +865,33 @@ class CommandGeneratorAction(ActionBase): act = self._generate([], [], env, 1) return str(act) - def genstring(self, target, source, env): - return self._generate(target, source, env, 1).genstring(target, source, env) + def batch_key(self, env, target, source): + return self._generate(target, source, env, 1).batch_key(env, target, source) + + def genstring(self, target, source, env, executor=None): + return self._generate(target, source, env, 1, executor).genstring(target, source, env) def __call__(self, target, source, env, exitstatfunc=_null, presub=_null, - show=_null, execute=_null, chdir=_null): - act = self._generate(target, source, env, 0) + show=_null, execute=_null, chdir=_null, executor=None): + act = self._generate(target, source, env, 0, executor) + if act is None: + raise UserError("While building `%s': Cannot deduce file extension from source files: %s" % (repr(map(str, target)), repr(map(str, source)))) return act(target, source, env, exitstatfunc, presub, - show, execute, chdir) + show, execute, chdir, executor) - def get_presig(self, target, source, env): + def get_presig(self, target, source, env, executor=None): """Return the signature contents of this action's command line. This strips $(-$) and everything in between the string, since those parts don't affect signatures. """ - return self._generate(target, source, env, 1).get_presig(target, source, env) + return self._generate(target, source, env, 1, executor).get_presig(target, source, env) - def get_implicit_deps(self, target, source, env): - return self._generate(target, source, env, 1).get_implicit_deps(target, source, env) + def get_implicit_deps(self, target, source, env, executor=None): + return self._generate(target, source, env, 1, executor).get_implicit_deps(target, source, env) + + def get_targets(self, env, executor): + return self._generate(None, None, env, 1, executor).get_targets(env, executor) @@ -864,14 +928,17 @@ class LazyAction(CommandGeneratorAction, CommandAction): return CommandGeneratorAction def _generate_cache(self, env): - c = env.get(self.var, '') + if env: + c = env.get(self.var, '') + else: + c = '' #TODO(1.5) gen_cmd = Action(c, **self.gen_kw) gen_cmd = apply(Action, (c,), self.gen_kw) if not gen_cmd: raise SCons.Errors.UserError("$%s value %s cannot be used to create an Action." % (self.var, repr(c))) return gen_cmd - def _generate(self, target, source, env, for_signature): + def _generate(self, target, source, env, for_signature, executor=None): return self._generate_cache(env) def __call__(self, target, source, env, *args, **kw): @@ -915,12 +982,15 @@ class FunctionAction(_ActionAction): except AttributeError: return "unknown_python_function" - def strfunction(self, target, source, env): + def strfunction(self, target, source, env, executor=None): if self.cmdstr is None: return None if self.cmdstr is not _null: from SCons.Subst import SUBST_RAW - c = env.subst(self.cmdstr, SUBST_RAW, target, source) + if executor: + c = env.subst(self.cmdstr, SUBST_RAW, executor=executor) + else: + c = env.subst(self.cmdstr, SUBST_RAW, target, source) if c: return c def array(a): @@ -953,9 +1023,12 @@ class FunctionAction(_ActionAction): return str(self.execfunction) return "%s(target, source, env)" % name - def execute(self, target, source, env): + def execute(self, target, source, env, executor=None): exc_info = (None,None,None) try: + if executor: + target = executor.get_all_targets() + source = executor.get_all_sources() rsources = map(rfile, source) try: result = self.execfunction(target=target, source=rsources, env=env) @@ -971,7 +1044,10 @@ class FunctionAction(_ActionAction): result = SCons.Errors.convert_to_BuildError(result, exc_info) result.node=target result.action=self - result.command=self.strfunction(target, source, env) + try: + result.command=self.strfunction(target, source, env, executor) + except TypeError: + result.command=self.strfunction(target, source, env) # FIXME: This maintains backward compatibility with respect to # which type of exceptions were returned by raising an @@ -1013,6 +1089,7 @@ class ListAction(ActionBase): # our children will have had any varlist # applied; we don't need to do it again self.varlist = () + self.targets = '$TARGETS' def genstring(self, target, source, env): return string.join(map(lambda a, t=target, s=source, e=env: @@ -1038,10 +1115,13 @@ class ListAction(ActionBase): "") def __call__(self, target, source, env, exitstatfunc=_null, presub=_null, - show=_null, execute=_null, chdir=_null): + show=_null, execute=_null, chdir=_null, executor=None): + if executor: + target = executor.get_all_targets() + source = executor.get_all_sources() for act in self.list: stat = act(target, source, env, exitstatfunc, presub, - show, execute, chdir) + show, execute, chdir, executor) if stat: return stat return 0 @@ -1111,7 +1191,7 @@ class ActionCaller: kw[key] = self.subst(self.kw[key], target, source, env) return kw - def __call__(self, target, source, env): + def __call__(self, target, source, env, executor=None): args = self.subst_args(target, source, env) kw = self.subst_kw(target, source, env) #TODO(1.5) return self.parent.actfunc(*args, **kw) diff --git a/third_party/scons/scons-local/SCons/Builder.py b/third_party/scons/scons-local/SCons/Builder.py index 97aabb4..f71a987 100644 --- a/third_party/scons/scons-local/SCons/Builder.py +++ b/third_party/scons/scons-local/SCons/Builder.py @@ -76,7 +76,7 @@ There are the following methods for internal use within this module: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Builder.py 3897 2009/01/13 06:45:54 scons" import UserDict import UserList @@ -118,6 +118,15 @@ class _Null: _null = _Null +def match_splitext(path, suffixes = []): + if suffixes: + matchsuf = filter(lambda S,path=path: path[-len(S):] == S, + suffixes) + if matchsuf: + suf = max(map(None, map(len, matchsuf), matchsuf))[1] + return [path[:-len(suf)], path[-len(suf):]] + return SCons.Util.splitext(path) + class DictCmdGenerator(SCons.Util.Selector): """This is a callable class that can be used as a command generator function. It holds on to a dictionary @@ -142,20 +151,22 @@ class DictCmdGenerator(SCons.Util.Selector): return [] if self.source_ext_match: + suffixes = self.src_suffixes() ext = None for src in map(str, source): - my_ext = SCons.Util.splitext(src)[1] + my_ext = match_splitext(src, suffixes)[1] if ext and my_ext != ext: raise UserError("While building `%s' from `%s': Cannot build multiple sources with different extensions: %s, %s" % (repr(map(str, target)), src, ext, my_ext)) ext = my_ext else: - ext = SCons.Util.splitext(str(source[0]))[1] + ext = match_splitext(str(source[0]), self.src_suffixes())[1] if not ext: + #return ext raise UserError("While building `%s': Cannot deduce file extension from source files: %s" % (repr(map(str, target)), repr(map(str, source)))) try: - ret = SCons.Util.Selector.__call__(self, env, source) + ret = SCons.Util.Selector.__call__(self, env, source, ext) except KeyError, e: raise UserError("Ambiguous suffixes after environment substitution: %s == %s == %s" % (e[0], e[1], e[2])) if ret is None: @@ -295,8 +306,9 @@ def _node_errors(builder, env, tlist, slist): if t.builder != builder: msg = "Two different builders (%s and %s) were specified for the same target: %s" % (t.builder.get_name(env), builder.get_name(env), t) raise UserError, msg - if t.get_executor().targets != tlist: - msg = "Two different target lists have a target in common: %s (from %s and from %s)" % (t, map(str, t.get_executor().targets), map(str, tlist)) + # TODO(batch): list constructed each time! + if t.get_executor().get_all_targets() != tlist: + msg = "Two different target lists have a target in common: %s (from %s and from %s)" % (t, map(str, t.get_executor().get_all_targets()), map(str, tlist)) raise UserError, msg elif t.sources != slist: msg = "Multiple ways to build the same target were specified for: %s (from %s and from %s)" % (t, map(str, t.sources), map(str, slist)) @@ -441,30 +453,10 @@ class BuilderBase: if not env: env = self.env if env: - matchsuf = filter(lambda S,path=path: path[-len(S):] == S, - self.src_suffixes(env)) - if matchsuf: - suf = max(map(None, map(len, matchsuf), matchsuf))[1] - return [path[:-len(suf)], path[-len(suf):]] - return SCons.Util.splitext(path) - - def get_single_executor(self, env, tlist, slist, executor_kw): - if not self.action: - raise UserError, "Builder %s must have an action to build %s."%(self.get_name(env or self.env), map(str,tlist)) - return self.action.get_executor(env or self.env, - [], # env already has overrides - tlist, - slist, - executor_kw) - - def get_multi_executor(self, env, tlist, slist, executor_kw): - try: - executor = tlist[0].get_executor(create = 0) - except (AttributeError, IndexError): - return self.get_single_executor(env, tlist, slist, executor_kw) + suffixes = self.src_suffixes(env) else: - executor.add_sources(slist) - return executor + suffixes = [] + return match_splitext(path, suffixes) def _adjustixes(self, files, pre, suf, ensure_suffix=False): if not files: @@ -566,11 +558,37 @@ class BuilderBase: # The targets are fine, so find or make the appropriate Executor to # build this particular list of targets from this particular list of # sources. + + executor = None + key = None + if self.multi: - get_executor = self.get_multi_executor - else: - get_executor = self.get_single_executor - executor = get_executor(env, tlist, slist, executor_kw) + try: + executor = tlist[0].get_executor(create = 0) + except (AttributeError, IndexError): + pass + else: + executor.add_sources(slist) + + if executor is None: + if not self.action: + fmt = "Builder %s must have an action to build %s." + raise UserError, fmt % (self.get_name(env or self.env), + map(str,tlist)) + key = self.action.batch_key(env or self.env, tlist, slist) + if key: + try: + executor = SCons.Executor.GetBatchExecutor(key) + except KeyError: + pass + else: + executor.add_batch(tlist, slist) + + if executor is None: + executor = SCons.Executor.Executor(self.action, env, [], + tlist, slist, executor_kw) + if key: + SCons.Executor.AddBatchExecutor(key, executor) # Now set up the relevant information in the target Nodes themselves. for t in tlist: diff --git a/third_party/scons/scons-local/SCons/CacheDir.py b/third_party/scons/scons-local/SCons/CacheDir.py index 6eb6f17..da2feef 100644 --- a/third_party/scons/scons-local/SCons/CacheDir.py +++ b/third_party/scons/scons-local/SCons/CacheDir.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/CacheDir.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/CacheDir.py 3897 2009/01/13 06:45:54 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 c6485b6..2ffdbad 100644 --- a/third_party/scons/scons-local/SCons/Debug.py +++ b/third_party/scons/scons-local/SCons/Debug.py @@ -7,7 +7,7 @@ needed by most users. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Debug.py 3897 2009/01/13 06:45:54 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 fc0ab26..9916da4 100644 --- a/third_party/scons/scons-local/SCons/Defaults.py +++ b/third_party/scons/scons-local/SCons/Defaults.py @@ -10,7 +10,7 @@ from distutils.msvccompiler. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,12 +32,13 @@ from distutils.msvccompiler. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Defaults.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Defaults.py 3897 2009/01/13 06:45:54 scons" import os import os.path +import errno import shutil import stat import string @@ -220,7 +221,14 @@ def mkdir_func(dest): if not SCons.Util.is_List(dest): dest = [dest] for entry in dest: - os.makedirs(str(entry)) + try: + os.makedirs(str(entry)) + except os.error, e: + p = str(entry) + if e[0] == errno.EEXIST and os.path.isdir(str(entry)): + pass # not an error if already exists + else: + raise Mkdir = ActionFactory(mkdir_func, lambda dir: 'Mkdir(%s)' % get_paths_str(dir)) diff --git a/third_party/scons/scons-local/SCons/Environment.py b/third_party/scons/scons-local/SCons/Environment.py index e1a8ec2..4a57bd6 100644 --- a/third_party/scons/scons-local/SCons/Environment.py +++ b/third_party/scons/scons-local/SCons/Environment.py @@ -10,7 +10,7 @@ Environment """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ Environment # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Environment.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Environment.py 3897 2009/01/13 06:45:54 scons" import copy @@ -109,19 +109,18 @@ def apply_tools(env, tools, toolpath): # set or override them. This warning can optionally be turned off, # but scons will still ignore the illegal variable names even if it's off. reserved_construction_var_names = [ + 'CHANGED_SOURCES', + 'CHANGED_TARGETS', 'SOURCE', 'SOURCES', 'TARGET', 'TARGETS', -] - -future_reserved_construction_var_names = [ - 'CHANGED_SOURCES', - 'CHANGED_TARGETS', 'UNCHANGED_SOURCES', 'UNCHANGED_TARGETS', ] +future_reserved_construction_var_names = [] + def copy_non_reserved_keywords(dict): result = semi_deepcopy(dict) for k in result.keys(): @@ -429,7 +428,7 @@ class SubstitutionEnvironment: self._dict[key] = value def get(self, key, default=None): - "Emulates the get() method of dictionaries.""" + """Emulates the get() method of dictionaries.""" return self._dict.get(key, default) def has_key(self, key): @@ -490,7 +489,7 @@ class SubstitutionEnvironment: def lvars(self): return {} - def subst(self, string, raw=0, target=None, source=None, conv=None): + def subst(self, string, raw=0, target=None, source=None, conv=None, executor=None): """Recursively interpolates construction variables from the Environment into the specified string, returning the expanded result. Construction variables are specified by a $ prefix @@ -503,6 +502,8 @@ class SubstitutionEnvironment: gvars = self.gvars() lvars = self.lvars() lvars['__env__'] = self + if executor: + lvars.update(executor.get_lvars()) return SCons.Subst.scons_subst(string, self, raw, target, source, gvars, lvars, conv) def subst_kw(self, kw, raw=0, target=None, source=None): @@ -514,12 +515,14 @@ class SubstitutionEnvironment: nkw[k] = v return nkw - def subst_list(self, string, raw=0, target=None, source=None, conv=None): + def subst_list(self, string, raw=0, target=None, source=None, conv=None, executor=None): """Calls through to SCons.Subst.scons_subst_list(). See the documentation for that function.""" gvars = self.gvars() lvars = self.lvars() lvars['__env__'] = self + if executor: + lvars.update(executor.get_lvars()) return SCons.Subst.scons_subst_list(string, self, raw, target, source, gvars, lvars, conv) def subst_path(self, path, target=None, source=None): @@ -1198,6 +1201,15 @@ class Base(SubstitutionEnvironment): orig[val] = None self.scanner_map_delete(kw) + # allow Dirs and strings beginning with # for top-relative + # Note this uses the current env's fs (in self). + def _canonicalize(self, path): + if not SCons.Util.is_String(path): # typically a Dir + path = str(path) + if path and path[0] == '#': + path = str(self.fs.Dir(path)) + return path + def AppendENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep, delete_existing=1): """Append path elements to the path 'name' in the 'ENV' @@ -1214,7 +1226,8 @@ class Base(SubstitutionEnvironment): 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, delete_existing) + nv = SCons.Util.AppendPath(orig, newpath, sep, delete_existing, + canonicalize=self._canonicalize) if not self._dict.has_key(envname): self._dict[envname] = {} @@ -1569,7 +1582,8 @@ class Base(SubstitutionEnvironment): 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, delete_existing) + nv = SCons.Util.PrependPath(orig, newpath, sep, delete_existing, + canonicalize=self._canonicalize) if not self._dict.has_key(envname): self._dict[envname] = {} diff --git a/third_party/scons/scons-local/SCons/Errors.py b/third_party/scons/scons-local/SCons/Errors.py index 8369873..ca3dc28 100644 --- a/third_party/scons/scons-local/SCons/Errors.py +++ b/third_party/scons/scons-local/SCons/Errors.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ and user errors in SCons. """ -__revision__ = "src/engine/SCons/Errors.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Errors.py 3897 2009/01/13 06:45:54 scons" import SCons.Util diff --git a/third_party/scons/scons-local/SCons/Executor.py b/third_party/scons/scons-local/SCons/Executor.py index a37da07..f49faaf 100644 --- a/third_party/scons/scons-local/SCons/Executor.py +++ b/third_party/scons/scons-local/SCons/Executor.py @@ -6,7 +6,7 @@ Nodes. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,15 +28,88 @@ Nodes. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Executor.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Executor.py 3897 2009/01/13 06:45:54 scons" import string +import UserList from SCons.Debug import logInstanceCreation import SCons.Errors import SCons.Memoize +class Batch: + """Remembers exact association between targets + and sources of executor.""" + def __init__(self, targets=[], sources=[]): + self.targets = targets + self.sources = sources + + + +class TSList(UserList.UserList): + """A class that implements $TARGETS or $SOURCES expansions by wrapping + an executor Method. This class is used in the Executor.lvars() + to delay creation of NodeList objects until they're needed. + + Note that we subclass UserList.UserList purely so that the + is_Sequence() function will identify an object of this class as + a list during variable expansion. We're not really using any + UserList.UserList methods in practice. + """ + def __init__(self, func): + self.func = func + def __getattr__(self, attr): + nl = self.func() + return getattr(nl, attr) + def __getitem__(self, i): + nl = self.func() + return nl[i] + def __getslice__(self, i, j): + nl = self.func() + i = max(i, 0); j = max(j, 0) + return nl[i:j] + def __str__(self): + nl = self.func() + return str(nl) + def __repr__(self): + nl = self.func() + return repr(nl) + +class TSObject: + """A class that implements $TARGET or $SOURCE expansions by wrapping + an Executor method. + """ + def __init__(self, func): + self.func = func + def __getattr__(self, attr): + n = self.func() + return getattr(n, attr) + def __str__(self): + n = self.func() + if n: + return str(n) + return '' + def __repr__(self): + n = self.func() + if n: + return repr(n) + return '' + +def rfile(node): + """ + A function to return the results of a Node's rfile() method, + if it exists, and the Node itself otherwise (if it's a Value + Node, e.g.). + """ + try: + rfile = node.rfile + except AttributeError: + return node + else: + return rfile() + + class Executor: """A class for controlling instances of executing an action. @@ -58,12 +131,96 @@ class Executor: self.post_actions = [] self.env = env self.overridelist = overridelist - self.targets = targets - self.sources = sources[:] - self.sources_need_sorting = False + if targets or sources: + self.batches = [Batch(targets[:], sources[:])] + else: + self.batches = [] self.builder_kw = builder_kw self._memo = {} + def get_lvars(self): + try: + return self.lvars + except AttributeError: + self.lvars = { + 'CHANGED_SOURCES' : TSList(self._get_changed_sources), + 'CHANGED_TARGETS' : TSList(self._get_changed_targets), + 'SOURCE' : TSObject(self._get_source), + 'SOURCES' : TSList(self._get_sources), + 'TARGET' : TSObject(self._get_target), + 'TARGETS' : TSList(self._get_targets), + 'UNCHANGED_SOURCES' : TSList(self._get_unchanged_sources), + 'UNCHANGED_TARGETS' : TSList(self._get_unchanged_targets), + } + return self.lvars + + def _get_changes(self): + cs = [] + ct = [] + us = [] + ut = [] + for b in self.batches: + if b.targets[0].changed(): + cs.extend(map(rfile, b.sources)) + ct.extend(b.targets) + else: + us.extend(map(rfile, b.sources)) + ut.extend(b.targets) + self._changed_sources_list = SCons.Util.NodeList(cs) + self._changed_targets_list = SCons.Util.NodeList(ct) + self._unchanged_sources_list = SCons.Util.NodeList(us) + self._unchanged_targets_list = SCons.Util.NodeList(ut) + + def _get_changed_sources(self, *args, **kw): + try: + return self._changed_sources_list + except AttributeError: + self._get_changes() + return self._changed_sources_list + + def _get_changed_targets(self, *args, **kw): + try: + return self._changed_targets_list + except AttributeError: + self._get_changes() + return self._changed_targets_list + + def _get_source(self, *args, **kw): + #return SCons.Util.NodeList([rfile(self.batches[0].sources[0]).get_subst_proxy()]) + return rfile(self.batches[0].sources[0]).get_subst_proxy() + + def _get_sources(self, *args, **kw): + return SCons.Util.NodeList(map(lambda n: rfile(n).get_subst_proxy(), self.get_all_sources())) + + def _get_target(self, *args, **kw): + #return SCons.Util.NodeList([self.batches[0].targets[0].get_subst_proxy()]) + return self.batches[0].targets[0].get_subst_proxy() + + def _get_targets(self, *args, **kw): + return SCons.Util.NodeList(map(lambda n: n.get_subst_proxy(), self.get_all_targets())) + + def _get_unchanged_sources(self, *args, **kw): + try: + return self._unchanged_sources_list + except AttributeError: + self._get_changes() + return self._unchanged_sources_list + + def _get_unchanged_targets(self, *args, **kw): + try: + return self._unchanged_targets_list + except AttributeError: + self._get_changes() + return self._unchanged_targets_list + + def get_action_targets(self): + if not self.action_list: + return [] + targets_string = self.action_list[0].get_targets(self.env, self) + if targets_string[0] == '$': + targets_string = targets_string[1:] + return self.get_lvars()[targets_string] + def set_action_list(self, action): import SCons.Util if not SCons.Util.is_List(action): @@ -76,6 +233,58 @@ class Executor: def get_action_list(self): return self.pre_actions + self.action_list + self.post_actions + def get_all_targets(self): + """Returns all targets for all batches of this Executor.""" + result = [] + for batch in self.batches: + # TODO(1.5): remove the list() cast + result.extend(list(batch.targets)) + return result + + def get_all_sources(self): + """Returns all sources for all batches of this Executor.""" + result = [] + for batch in self.batches: + # TODO(1.5): remove the list() cast + result.extend(list(batch.sources)) + return result + + def get_all_children(self): + """Returns all unique children (dependencies) for all batches + of this Executor. + + The Taskmaster can recognize when it's already evaluated a + Node, so we don't have to make this list unique for its intended + canonical use case, but we expect there to be a lot of redundancy + (long lists of batched .cc files #including the same .h files + over and over), so removing the duplicates once up front should + save the Taskmaster a lot of work. + """ + result = SCons.Util.UniqueList([]) + for target in self.get_all_targets(): + result.extend(target.children()) + return result + + def get_all_prerequisites(self): + """Returns all unique (order-only) prerequisites for all batches + of this Executor. + """ + result = SCons.Util.UniqueList([]) + for target in self.get_all_targets(): + # TODO(1.5): remove the list() cast + result.extend(list(target.prerequisites)) + return result + + def get_action_side_effects(self): + + """Returns all side effects for all batches of this + Executor used by the underlying Action. + """ + result = SCons.Util.UniqueList([]) + for target in self.get_action_targets(): + result.extend(target.side_effects) + return result + memoizer_counters.append(SCons.Memoize.CountValue('get_build_env')) def get_build_env(self): @@ -109,14 +318,17 @@ class Executor: """ env = self.get_build_env() try: - cwd = self.targets[0].cwd + cwd = self.batches[0].targets[0].cwd except (IndexError, AttributeError): cwd = None - return scanner.path(env, cwd, self.targets, self.get_sources()) + return scanner.path(env, cwd, + self.get_all_targets(), + self.get_all_sources()) def get_kw(self, kw={}): result = self.builder_kw.copy() result.update(kw) + result['executor'] = self return result def do_nothing(self, target, kw): @@ -128,7 +340,9 @@ class Executor: kw = self.get_kw(kw) status = 0 for act in self.get_action_list(): - status = apply(act, (self.targets, self.get_sources(), env), kw) + #args = (self.get_all_targets(), self.get_all_sources(), env) + args = ([], [], env) + status = apply(act, args, kw) if isinstance(status, SCons.Errors.BuildError): status.executor = self raise status @@ -136,7 +350,7 @@ class Executor: msg = "Error %s" % status raise SCons.Errors.BuildError( errstr=msg, - node=self.targets, + node=self.batches[0].targets, executor=self, action=act) return status @@ -155,24 +369,32 @@ class Executor: """Add source files to this Executor's list. This is necessary for "multi" Builders that can be called repeatedly to build up a source file list for a given target.""" - self.sources.extend(sources) - self.sources_need_sorting = True + # TODO(batch): extend to multiple batches + assert (len(self.batches) == 1) + # TODO(batch): remove duplicates? + sources = filter(lambda x, s=self.batches[0].sources: x not in s, sources) + self.batches[0].sources.extend(sources) def get_sources(self): - if self.sources_need_sorting: - self.sources = SCons.Util.uniquer_hashables(self.sources) - self.sources_need_sorting = False - return self.sources + return self.batches[0].sources + + def add_batch(self, targets, sources): + """Add pair of associated target and source to this Executor's list. + This is necessary for "batch" Builders that can be called repeatedly + to build up a list of matching target and source files that will be + used in order to update multiple target files at once from multiple + corresponding source files, for tools like MSVC that support it.""" + self.batches.append(Batch(targets, sources)) def prepare(self): """ Preparatory checks for whether this Executor can go ahead and (try to) build its targets. """ - for s in self.get_sources(): + for s in self.get_all_sources(): if s.missing(): msg = "Source `%s' not found, needed by target `%s'." - raise SCons.Errors.StopError, msg % (s, self.targets[0]) + raise SCons.Errors.StopError, msg % (s, self.batches[0].targets[0]) def add_pre_action(self, action): self.pre_actions.append(action) @@ -184,7 +406,7 @@ class Executor: def my_str(self): env = self.get_build_env() - get = lambda action, t=self.targets, s=self.get_sources(), e=env: \ + get = lambda action, t=self.get_all_targets(), s=self.get_all_sources(), e=env: \ action.genstring(t, s, e) return string.join(map(get, self.get_action_list()), "\n") @@ -209,7 +431,7 @@ class Executor: except KeyError: pass env = self.get_build_env() - get = lambda action, t=self.targets, s=self.get_sources(), e=env: \ + get = lambda action, t=self.get_all_targets(), s=self.get_all_sources(), e=env: \ action.get_contents(t, s, e) result = string.join(map(get, self.get_action_list()), "") self._memo['get_contents'] = result @@ -223,11 +445,13 @@ class Executor: return 0 def scan_targets(self, scanner): - self.scan(scanner, self.targets) + # TODO(batch): scan by batches + self.scan(scanner, self.get_all_targets()) def scan_sources(self, scanner): - if self.sources: - self.scan(scanner, self.get_sources()) + # TODO(batch): scan by batches + if self.batches[0].sources: + self.scan(scanner, self.get_all_sources()) def scan(self, scanner, node_list): """Scan a list of this Executor's files (targets or sources) for @@ -237,6 +461,7 @@ class Executor: """ env = self.get_build_env() + # TODO(batch): scan by batches) deps = [] if scanner: for node in node_list: @@ -261,16 +486,16 @@ class Executor: deps.extend(self.get_implicit_deps()) - for tgt in self.targets: + for tgt in self.get_all_targets(): tgt.add_to_implicit(deps) - def _get_unignored_sources_key(self, ignore=()): - return tuple(ignore) + def _get_unignored_sources_key(self, node, ignore=()): + return (node,) + tuple(ignore) memoizer_counters.append(SCons.Memoize.CountDict('get_unignored_sources', _get_unignored_sources_key)) - def get_unignored_sources(self, ignore=()): - ignore = tuple(ignore) + def get_unignored_sources(self, node, ignore=()): + key = (node,) + tuple(ignore) try: memo_dict = self._memo['get_unignored_sources'] except KeyError: @@ -278,56 +503,56 @@ class Executor: self._memo['get_unignored_sources'] = memo_dict else: try: - return memo_dict[ignore] + return memo_dict[key] except KeyError: pass - sourcelist = self.get_sources() + if node: + # TODO: better way to do this (it's a linear search, + # but it may not be critical path)? + sourcelist = [] + for b in self.batches: + if node in b.targets: + sourcelist = b.sources + break + else: + sourcelist = self.get_all_sources() if ignore: idict = {} for i in ignore: idict[i] = 1 sourcelist = filter(lambda s, i=idict: not i.has_key(s), sourcelist) - memo_dict[ignore] = sourcelist + memo_dict[key] = sourcelist return sourcelist - def _process_sources_key(self, func, ignore=()): - return (func, tuple(ignore)) - - memoizer_counters.append(SCons.Memoize.CountDict('process_sources', _process_sources_key)) - - def process_sources(self, func, ignore=()): - memo_key = (func, tuple(ignore)) - try: - memo_dict = self._memo['process_sources'] - except KeyError: - memo_dict = {} - self._memo['process_sources'] = memo_dict - else: - try: - return memo_dict[memo_key] - except KeyError: - pass - - result = map(func, self.get_unignored_sources(ignore)) - - memo_dict[memo_key] = result - - return result - def get_implicit_deps(self): """Return the executor's implicit dependencies, i.e. the nodes of the commands to be executed.""" result = [] build_env = self.get_build_env() for act in self.get_action_list(): - result.extend(act.get_implicit_deps(self.targets, self.get_sources(), build_env)) + deps = act.get_implicit_deps(self.get_all_targets(), + self.get_all_sources(), + build_env) + result.extend(deps) return result + + +_batch_executors = {} + +def GetBatchExecutor(key): + return _batch_executors[key] + +def AddBatchExecutor(key, executor): + assert not _batch_executors.has_key(key) + _batch_executors[key] = executor + nullenv = None + def get_NullEnvironment(): """Use singleton pattern for Null Environments.""" global nullenv @@ -354,7 +579,7 @@ class Null: """ def __init__(self, *args, **kw): if __debug__: logInstanceCreation(self, 'Executor.Null') - self.targets = kw['targets'] + self.batches = [Batch(kw['targets'][:], [])] def get_build_env(self): return get_NullEnvironment() def get_build_scanner_path(self): @@ -365,17 +590,30 @@ class Null: pass def get_unignored_sources(self, *args, **kw): return tuple(()) + def get_action_targets(self): + return [] def get_action_list(self): return [] + def get_all_targets(self): + return self.batches[0].targets + def get_all_sources(self): + return self.batches[0].targets[0].sources + def get_all_children(self): + return self.get_all_sources() + def get_all_prerequisites(self): + return [] + def get_action_side_effects(self): + return [] def __call__(self, *args, **kw): return 0 def get_contents(self): return '' - def _morph(self): """Morph this Null executor to a real Executor object.""" + batches = self.batches self.__class__ = Executor - self.__init__([], targets=self.targets) + self.__init__([]) + self.batches = batches # The following methods require morphing this Null Executor to a # real Executor object. diff --git a/third_party/scons/scons-local/SCons/Job.py b/third_party/scons/scons-local/SCons/Job.py index bcd3981..08efe16 100644 --- a/third_party/scons/scons-local/SCons/Job.py +++ b/third_party/scons/scons-local/SCons/Job.py @@ -7,7 +7,7 @@ stop, and wait on jobs. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Job.py 3897 2009/01/13 06:45:54 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 f79dd6b..a639622 100644 --- a/third_party/scons/scons-local/SCons/Memoize.py +++ b/third_party/scons/scons-local/SCons/Memoize.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Memoize.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Memoize.py 3897 2009/01/13 06:45:54 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 4ce9fff..19493e2 100644 --- a/third_party/scons/scons-local/SCons/Node/Alias.py +++ b/third_party/scons/scons-local/SCons/Node/Alias.py @@ -8,7 +8,7 @@ This creates a hash of global Aliases (dummy targets). """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Node/Alias.py 3897 2009/01/13 06:45:54 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 915f0cc..56e9d85 100644 --- a/third_party/scons/scons-local/SCons/Node/FS.py +++ b/third_party/scons/scons-local/SCons/Node/FS.py @@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -33,10 +33,11 @@ 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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Node/FS.py 3897 2009/01/13 06:45:54 scons" -import fnmatch from itertools import izip +import cStringIO +import fnmatch import os import os.path import re @@ -45,7 +46,24 @@ import stat import string import sys import time -import cStringIO + +try: + import codecs +except ImportError: + pass +else: + # TODO(2.2): Remove when 2.3 becomes the minimal supported version. + try: + codecs.BOM_UTF8 + except AttributeError: + codecs.BOM_UTF8 = '\xef\xbb\xbf' + try: + codecs.BOM_UTF16 + except AttributeError: + if sys.byteorder == 'little': + codecs.BOM_UTF16 = '\xff\xfe' + else: + codecs.BOM_UTF16 = '\xfe\xff' import SCons.Action from SCons.Debug import logInstanceCreation @@ -876,11 +894,8 @@ class Entry(Base): return self.get_suffix() def get_contents(self): - """Fetch the contents of the entry. - - Since this should return the real contents from the file - system, we check to see into what sort of subclass we should - morph this Entry.""" + """Fetch the contents of the entry. Returns the exact binary + contents of the file.""" try: self = self.disambiguate(must_exist=1) except SCons.Errors.UserError: @@ -893,6 +908,24 @@ class Entry(Base): else: return self.get_contents() + def get_text_contents(self): + """Fetch the decoded text contents of a Unicode encoded Entry. + + Since this should return the text contents from the file + system, we check to see into what sort of subclass we should + morph this Entry.""" + try: + self = self.disambiguate(must_exist=1) + except SCons.Errors.UserError: + # There was nothing on disk with which to disambiguate + # this entry. Leave it as an Entry, but return a null + # string so calls to get_text_contents() in emitters and + # the like (e.g. in qt.py) don't have to disambiguate by + # hand or catch the exception. + return '' + else: + return self.get_text_contents() + def must_be_same(self, klass): """Called to make sure a Node is a Dir. Since we're an Entry, we can morph into one.""" @@ -933,6 +966,9 @@ class Entry(Base): def _glob1(self, pattern, ondisk=True, source=False, strings=False): return self.disambiguate()._glob1(pattern, ondisk, source, strings) + def get_subst_proxy(self): + return self.disambiguate().get_subst_proxy() + # This is for later so we can differentiate between Entry the class and Entry # the method of the FS class. _classEntry = Entry @@ -1598,13 +1634,18 @@ class Dir(Base): """A directory does not get scanned.""" return None + def get_text_contents(self): + """We already emit things in text, so just return the binary + version.""" + return self.get_contents() + def get_contents(self): """Return content signatures and names of all our children separated by new-lines. Ensure that the nodes are sorted.""" contents = [] name_cmp = lambda a, b: cmp(a.name, b.name) sorted_children = self.children()[:] - sorted_children.sort(name_cmp) + sorted_children.sort(name_cmp) for node in sorted_children: contents.append('%s %s\n' % (node.get_csig(), node.name)) return string.join(contents, '') @@ -2236,12 +2277,28 @@ class File(Base): return '' fname = self.rfile().abspath try: - r = open(fname, "rb").read() + contents = open(fname, "rb").read() except EnvironmentError, e: if not e.filename: e.filename = fname raise - return r + return contents + + try: + import codecs + except ImportError: + get_text_contents = get_contents + else: + # This attempts to figure out what the encoding of the text is + # based upon the BOM bytes, and then decodes the contents so that + # it's a valid python string. + def get_text_contents(self): + contents = self.get_contents() + if contents.startswith(codecs.BOM_UTF8): + contents = contents.decode('utf-8') + elif contents.startswith(codecs.BOM_UTF16): + contents = contents.decode('utf-16') + return contents def get_content_hash(self): """ @@ -2834,6 +2891,19 @@ class File(Base): (isinstance(node, File) or isinstance(node, Entry) \ or not node.is_derived()): result = node + # Copy over our local attributes to the repository + # Node so we identify shared object files in the + # repository and don't assume they're static. + # + # This isn't perfect; the attribute would ideally + # be attached to the object in the repository in + # case it was built statically in the repository + # and we changed it to shared locally, but that's + # rarely the case and would only occur if you + # intentionally used the same suffix for both + # shared and static objects anyway. So this + # should work well in practice. + result.attributes = self.attributes break self._memo['rfile'] = result return result diff --git a/third_party/scons/scons-local/SCons/Node/Python.py b/third_party/scons/scons-local/SCons/Node/Python.py index 21fbb15..0009f0c 100644 --- a/third_party/scons/scons-local/SCons/Node/Python.py +++ b/third_party/scons/scons-local/SCons/Node/Python.py @@ -5,7 +5,7 @@ Python nodes. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Node/Python.py 3897 2009/01/13 06:45:54 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 8ea6719..04c80a8 100644 --- a/third_party/scons/scons-local/SCons/Node/__init__.py +++ b/third_party/scons/scons-local/SCons/Node/__init__.py @@ -20,7 +20,7 @@ be able to depend on any other type of "thing." """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Node/__init__.py 3897 2009/01/13 06:45:54 scons" import copy from itertools import chain, izip @@ -621,7 +621,7 @@ class Node: # essentially short-circuits an N*M scan of the # sources for each individual target, which is a hell # of a lot more efficient. - for tgt in executor.targets: + for tgt in executor.get_all_targets(): tgt.add_to_implicit(implicit) if implicit_deps_unchanged or self.is_up_to_date(): @@ -714,7 +714,7 @@ class Node: if s not in ignore_set: sources.append(s) else: - sources = executor.get_unignored_sources(self.ignore) + sources = executor.get_unignored_sources(self, self.ignore) seen = set() bsources = [] bsourcesigs = [] diff --git a/third_party/scons/scons-local/SCons/Options/BoolOption.py b/third_party/scons/scons-local/SCons/Options/BoolOption.py index c5fed0a..8e2ad32 100644 --- a/third_party/scons/scons-local/SCons/Options/BoolOption.py +++ b/third_party/scons/scons-local/SCons/Options/BoolOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/BoolOption.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Options/BoolOption.py 3897 2009/01/13 06:45:54 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 4f50d01..ec075af 100644 --- a/third_party/scons/scons-local/SCons/Options/EnumOption.py +++ b/third_party/scons/scons-local/SCons/Options/EnumOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/EnumOption.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Options/EnumOption.py 3897 2009/01/13 06:45:54 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 b4cd923..fa4a8da 100644 --- a/third_party/scons/scons-local/SCons/Options/ListOption.py +++ b/third_party/scons/scons-local/SCons/Options/ListOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/ListOption.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Options/ListOption.py 3897 2009/01/13 06:45:54 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 7fcbe5f1..838fe9f 100644 --- a/third_party/scons/scons-local/SCons/Options/PackageOption.py +++ b/third_party/scons/scons-local/SCons/Options/PackageOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/PackageOption.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Options/PackageOption.py 3897 2009/01/13 06:45:54 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 649fc45..223af5f 100644 --- a/third_party/scons/scons-local/SCons/Options/PathOption.py +++ b/third_party/scons/scons-local/SCons/Options/PathOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/PathOption.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Options/PathOption.py 3897 2009/01/13 06:45:54 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 3e41b8d..ca19dbb 100644 --- a/third_party/scons/scons-local/SCons/Options/__init__.py +++ b/third_party/scons/scons-local/SCons/Options/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/__init__.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Options/__init__.py 3897 2009/01/13 06:45:54 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 8b877fa..2f40131 100644 --- a/third_party/scons/scons-local/SCons/PathList.py +++ b/third_party/scons/scons-local/SCons/PathList.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/PathList.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/PathList.py 3897 2009/01/13 06:45:54 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 1215865..b6d8057 100644 --- a/third_party/scons/scons-local/SCons/Platform/__init__.py +++ b/third_party/scons/scons-local/SCons/Platform/__init__.py @@ -20,7 +20,7 @@ their own platform definition. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/__init__.py 3897 2009/01/13 06:45:54 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 c8cb7e8..e910337 100644 --- a/third_party/scons/scons-local/SCons/Platform/aix.py +++ b/third_party/scons/scons-local/SCons/Platform/aix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/aix.py 3897 2009/01/13 06:45:54 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 f51eeb1..6e09e918f 100644 --- a/third_party/scons/scons-local/SCons/Platform/cygwin.py +++ b/third_party/scons/scons-local/SCons/Platform/cygwin.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/cygwin.py 3897 2009/01/13 06:45:54 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 9436546..9fbed4a 100644 --- a/third_party/scons/scons-local/SCons/Platform/darwin.py +++ b/third_party/scons/scons-local/SCons/Platform/darwin.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/darwin.py 3897 2009/01/13 06:45:54 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 2bd468b..aefd301 100644 --- a/third_party/scons/scons-local/SCons/Platform/hpux.py +++ b/third_party/scons/scons-local/SCons/Platform/hpux.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/hpux.py 3897 2009/01/13 06:45:54 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 b70481d..13dfaec 100644 --- a/third_party/scons/scons-local/SCons/Platform/irix.py +++ b/third_party/scons/scons-local/SCons/Platform/irix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/irix.py 3897 2009/01/13 06:45:54 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 803d890..1ad0444 100644 --- a/third_party/scons/scons-local/SCons/Platform/os2.py +++ b/third_party/scons/scons-local/SCons/Platform/os2.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/os2.py 3897 2009/01/13 06:45:54 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 6d0b074..537ef78 100644 --- a/third_party/scons/scons-local/SCons/Platform/posix.py +++ b/third_party/scons/scons-local/SCons/Platform/posix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/posix.py 3897 2009/01/13 06:45:54 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 03435c6..a92c849 100644 --- a/third_party/scons/scons-local/SCons/Platform/sunos.py +++ b/third_party/scons/scons-local/SCons/Platform/sunos.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/sunos.py 3897 2009/01/13 06:45:54 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 3ec0a52..489d20d 100644 --- a/third_party/scons/scons-local/SCons/Platform/win32.py +++ b/third_party/scons/scons-local/SCons/Platform/win32.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Platform/win32.py 3897 2009/01/13 06:45:54 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 ec80fe9..745e90b 100644 --- a/third_party/scons/scons-local/SCons/SConf.py +++ b/third_party/scons/scons-local/SCons/SConf.py @@ -4,7 +4,7 @@ Autoconf-like configuration support. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/SConf.py 3897 2009/01/13 06:45:54 scons" import os import re @@ -203,7 +203,7 @@ class Streamer: self.s.flush() -class SConfBuildTask(SCons.Taskmaster.Task): +class SConfBuildTask(SCons.Taskmaster.AlwaysTask): """ This is almost the same as SCons.Script.BuildTask. Handles SConfErrors correctly and knows about the current cache_mode. diff --git a/third_party/scons/scons-local/SCons/SConsign.py b/third_party/scons/scons-local/SCons/SConsign.py index 8e4c30c..144b0de 100644 --- a/third_party/scons/scons-local/SCons/SConsign.py +++ b/third_party/scons/scons-local/SCons/SConsign.py @@ -5,7 +5,7 @@ Writing and reading information to the .sconsign file or files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/SConsign.py 3897 2009/01/13 06:45:54 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 926493e..eacf9f4 100644 --- a/third_party/scons/scons-local/SCons/Scanner/C.py +++ b/third_party/scons/scons-local/SCons/Scanner/C.py @@ -5,7 +5,7 @@ This module implements the depenency scanner for C/C++ code. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/C.py 3897 2009/01/13 06:45:54 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 97ece3a..9a481d0 100644 --- a/third_party/scons/scons-local/SCons/Scanner/D.py +++ b/third_party/scons/scons-local/SCons/Scanner/D.py @@ -8,7 +8,7 @@ Coded by Andy Friesen """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/D.py 3897 2009/01/13 06:45:54 scons" import re import string @@ -63,6 +63,6 @@ class D(SCons.Scanner.Classic): def find_include_names(self, node): includes = [] - for i in self.cre.findall(node.get_contents()): + for i in self.cre.findall(node.get_text_contents()): includes = includes + self.cre2.findall(i) return includes diff --git a/third_party/scons/scons-local/SCons/Scanner/Dir.py b/third_party/scons/scons-local/SCons/Scanner/Dir.py index 35d5008..90f6580 100644 --- a/third_party/scons/scons-local/SCons/Scanner/Dir.py +++ b/third_party/scons/scons-local/SCons/Scanner/Dir.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/Dir.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/Dir.py 3897 2009/01/13 06:45:54 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 e629b80..6bc9b3b 100644 --- a/third_party/scons/scons-local/SCons/Scanner/Fortran.py +++ b/third_party/scons/scons-local/SCons/Scanner/Fortran.py @@ -5,7 +5,7 @@ This module implements the dependency scanner for Fortran code. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/Fortran.py 3897 2009/01/13 06:45:54 scons" import re import string @@ -84,11 +84,11 @@ class F90Scanner(SCons.Scanner.Classic): mods_and_includes = node.includes else: # retrieve all included filenames - includes = self.cre_incl.findall(node.get_contents()) + includes = self.cre_incl.findall(node.get_text_contents()) # retrieve all USE'd module names - modules = self.cre_use.findall(node.get_contents()) + modules = self.cre_use.findall(node.get_text_contents()) # retrieve all defined module names - defmodules = self.cre_def.findall(node.get_contents()) + defmodules = self.cre_def.findall(node.get_text_contents()) # Remove all USE'd module names that are defined in the same file d = {} diff --git a/third_party/scons/scons-local/SCons/Scanner/IDL.py b/third_party/scons/scons-local/SCons/Scanner/IDL.py index 9bd1728..d8646ef 100644 --- a/third_party/scons/scons-local/SCons/Scanner/IDL.py +++ b/third_party/scons/scons-local/SCons/Scanner/IDL.py @@ -6,7 +6,7 @@ Definition Language) files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/IDL.py 3897 2009/01/13 06:45:54 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 3e17e25..c385b2d 100644 --- a/third_party/scons/scons-local/SCons/Scanner/LaTeX.py +++ b/third_party/scons/scons-local/SCons/Scanner/LaTeX.py @@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ 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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/LaTeX.py 3897 2009/01/13 06:45:54 scons" import os.path import string @@ -251,6 +251,9 @@ class LaTeX(SCons.Scanner.Base): 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 + TexGraphics) + # use the line above to find dependency for PDF builder when only .eps figure is present + # Since it will be found if the user tell scons how to make the pdf figure leave it out for now. return map(lambda e, f=filename: f+e, self.graphics_extensions) return [filename] @@ -285,7 +288,7 @@ class LaTeX(SCons.Scanner.Base): if node.includes != None: includes = node.includes else: - includes = self.cre.findall(node.get_contents()) + includes = self.cre.findall(node.get_text_contents()) # 1. Split comma-separated lines, e.g. # ('bibliography', 'phys,comp') # should become two entries diff --git a/third_party/scons/scons-local/SCons/Scanner/Prog.py b/third_party/scons/scons-local/SCons/Scanner/Prog.py index ad71ba4..860e5e5 100644 --- a/third_party/scons/scons-local/SCons/Scanner/Prog.py +++ b/third_party/scons/scons-local/SCons/Scanner/Prog.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/Prog.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/Prog.py 3897 2009/01/13 06:45:54 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 index ecbc572..cd669b4 100644 --- a/third_party/scons/scons-local/SCons/Scanner/RC.py +++ b/third_party/scons/scons-local/SCons/Scanner/RC.py @@ -6,7 +6,7 @@ Definition Language) files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ Definition Language) files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/RC.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/RC.py 3897 2009/01/13 06:45:54 scons" import SCons.Node.FS import SCons.Scanner diff --git a/third_party/scons/scons-local/SCons/Scanner/__init__.py b/third_party/scons/scons-local/SCons/Scanner/__init__.py index e18f0fe..4824334 100644 --- a/third_party/scons/scons-local/SCons/Scanner/__init__.py +++ b/third_party/scons/scons-local/SCons/Scanner/__init__.py @@ -5,7 +5,7 @@ The Scanner package for the SCons software construction utility. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Scanner/__init__.py 3897 2009/01/13 06:45:54 scons" import re import string @@ -347,7 +347,7 @@ class Classic(Current): return SCons.Node.FS._my_normcase(include) def find_include_names(self, node): - return self.cre.findall(node.get_contents()) + return self.cre.findall(node.get_text_contents()) def scan(self, node, path=()): diff --git a/third_party/scons/scons-local/SCons/Script/Interactive.py b/third_party/scons/scons-local/SCons/Script/Interactive.py index 13cc414..9fa4445 100644 --- a/third_party/scons/scons-local/SCons/Script/Interactive.py +++ b/third_party/scons/scons-local/SCons/Script/Interactive.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/Interactive.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Script/Interactive.py 3897 2009/01/13 06:45:54 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 5624038..a91f410 100644 --- a/third_party/scons/scons-local/SCons/Script/Main.py +++ b/third_party/scons/scons-local/SCons/Script/Main.py @@ -12,7 +12,7 @@ it goes here. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Script/Main.py 3897 2009/01/13 06:45:54 scons" import os import os.path @@ -155,7 +155,7 @@ _BuildFailures = [] def GetBuildFailures(): return _BuildFailures -class BuildTask(SCons.Taskmaster.Task): +class BuildTask(SCons.Taskmaster.OutOfDateTask): """An SCons build task.""" progress = ProgressObject @@ -164,16 +164,14 @@ class BuildTask(SCons.Taskmaster.Task): def prepare(self): self.progress(self.targets[0]) - return SCons.Taskmaster.Task.prepare(self) + return SCons.Taskmaster.OutOfDateTask.prepare(self) def needs_execute(self): - target = self.targets[0] - if target.get_state() == SCons.Node.executing: + if SCons.Taskmaster.OutOfDateTask.needs_execute(self): return True - else: - if self.top and target.has_builder(): - display("scons: `%s' is up to date." % str(self.node)) - return False + if self.top and self.targets[0].has_builder(): + display("scons: `%s' is up to date." % str(self.node)) + return False def execute(self): if print_time: @@ -181,7 +179,7 @@ class BuildTask(SCons.Taskmaster.Task): global first_command_start if first_command_start is None: first_command_start = start_time - SCons.Taskmaster.Task.execute(self) + SCons.Taskmaster.OutOfDateTask.execute(self) if print_time: global cumulative_command_time global last_command_end @@ -195,13 +193,13 @@ class BuildTask(SCons.Taskmaster.Task): global exit_status global this_build_status if self.options.ignore_errors: - SCons.Taskmaster.Task.executed(self) + SCons.Taskmaster.OutOfDateTask.executed(self) elif self.options.keep_going: - SCons.Taskmaster.Task.fail_continue(self) + SCons.Taskmaster.OutOfDateTask.fail_continue(self) exit_status = status this_build_status = status else: - SCons.Taskmaster.Task.fail_stop(self) + SCons.Taskmaster.OutOfDateTask.fail_stop(self) exit_status = status this_build_status = status @@ -223,9 +221,9 @@ class BuildTask(SCons.Taskmaster.Task): self.do_failed() else: print "scons: Nothing to be done for `%s'." % t - SCons.Taskmaster.Task.executed(self) + SCons.Taskmaster.OutOfDateTask.executed(self) else: - SCons.Taskmaster.Task.executed(self) + SCons.Taskmaster.OutOfDateTask.executed(self) def failed(self): # Handle the failure of a build task. The primary purpose here @@ -293,17 +291,17 @@ class BuildTask(SCons.Taskmaster.Task): if tree: print print tree - SCons.Taskmaster.Task.postprocess(self) + SCons.Taskmaster.OutOfDateTask.postprocess(self) def make_ready(self): """Make a task ready for execution""" - SCons.Taskmaster.Task.make_ready(self) + SCons.Taskmaster.OutOfDateTask.make_ready(self) if self.out_of_date and self.options.debug_explain: explanation = self.out_of_date[0].explain() if explanation: sys.stdout.write("scons: " + explanation) -class CleanTask(SCons.Taskmaster.Task): +class CleanTask(SCons.Taskmaster.AlwaysTask): """An SCons clean task.""" def fs_delete(self, path, pathstr, remove=1): try: @@ -379,11 +377,11 @@ class CleanTask(SCons.Taskmaster.Task): def prepare(self): pass -class QuestionTask(SCons.Taskmaster.Task): +class QuestionTask(SCons.Taskmaster.AlwaysTask): """An SCons task for the -q (question) option.""" def prepare(self): pass - + def execute(self): if self.targets[0].get_state() != SCons.Node.up_to_date or \ (self.top and not self.targets[0].exists()): @@ -1166,7 +1164,8 @@ def _build_targets(fs, options, targets, target_top): failure_message=failure_message ): if jobs.were_interrupted(): - progress_display("scons: Build interrupted.") + if not options.no_progress and not options.silent: + sys.stderr.write("scons: Build interrupted.\n") global exit_status global this_build_status exit_status = 2 @@ -1251,7 +1250,7 @@ def main(): # __main__.__version__, hence there is no script version. pass parts.append(version_string("engine", SCons)) - parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation") + parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation") version = string.join(parts, '') import SConsOptions diff --git a/third_party/scons/scons-local/SCons/Script/SConsOptions.py b/third_party/scons/scons-local/SCons/Script/SConsOptions.py index 636fd20..301d1c8 100644 --- a/third_party/scons/scons-local/SCons/Script/SConsOptions.py +++ b/third_party/scons/scons-local/SCons/Script/SConsOptions.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/SConsOptions.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Script/SConsOptions.py 3897 2009/01/13 06:45:54 scons" import optparse import re diff --git a/third_party/scons/scons-local/SCons/Script/SConscript.py b/third_party/scons/scons-local/SCons/Script/SConscript.py index c52c979..bf16375 100644 --- a/third_party/scons/scons-local/SCons/Script/SConscript.py +++ b/third_party/scons/scons-local/SCons/Script/SConscript.py @@ -6,7 +6,7 @@ files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/SConscript.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Script/SConscript.py 3897 2009/01/13 06:45:54 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 ad99991..34d7c48 100644 --- a/third_party/scons/scons-local/SCons/Script/__init__.py +++ b/third_party/scons/scons-local/SCons/Script/__init__.py @@ -12,7 +12,7 @@ it goes here. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Script/__init__.py 3897 2009/01/13 06:45:54 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 2e50308..cc0b852 100644 --- a/third_party/scons/scons-local/SCons/Sig.py +++ b/third_party/scons/scons-local/SCons/Sig.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Sig.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Sig.py 3897 2009/01/13 06:45:54 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 afebca4..5948f87 100644 --- a/third_party/scons/scons-local/SCons/Subst.py +++ b/third_party/scons/scons-local/SCons/Subst.py @@ -5,7 +5,7 @@ SCons string substitution. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Subst.py 3897 2009/01/13 06:45:54 scons" import re import string @@ -253,6 +253,15 @@ class Target_or_Source: return repr(nl[0]) return '' +class NullNodeList(SCons.Util.NullSeq): + def __call__(self, *args, **kwargs): return '' + def __str__(self): return '' + # TODO(1.5): unneeded after new-style classes introduce iterators + def __getitem__(self, i): + raise IndexError + +NullNodesList = NullNodeList() + def subst_dict(target, source): """Create a dictionary for substitution of special construction variables. @@ -279,9 +288,16 @@ def subst_dict(target, source): tnl = NLWrapper(target, get_tgt_subst_proxy) dict['TARGETS'] = Targets_or_Sources(tnl) dict['TARGET'] = Target_or_Source(tnl) + + # This is a total cheat, but hopefully this dictionary goes + # away soon anyway. We just let these expand to $TARGETS + # because that's "good enough" for the use of ToolSurrogates + # (see test/ToolSurrogate.py) to generate documentation. + dict['CHANGED_TARGETS'] = '$TARGETS' + dict['UNCHANGED_TARGETS'] = '$TARGETS' else: - dict['TARGETS'] = None - dict['TARGET'] = None + dict['TARGETS'] = NullNodesList + dict['TARGET'] = NullNodesList if source: def get_src_subst_proxy(node): @@ -298,9 +314,16 @@ def subst_dict(target, source): snl = NLWrapper(source, get_src_subst_proxy) dict['SOURCES'] = Targets_or_Sources(snl) dict['SOURCE'] = Target_or_Source(snl) + + # This is a total cheat, but hopefully this dictionary goes + # away soon anyway. We just let these expand to $TARGETS + # because that's "good enough" for the use of ToolSurrogates + # (see test/ToolSurrogate.py) to generate documentation. + dict['CHANGED_SOURCES'] = '$SOURCES' + dict['UNCHANGED_SOURCES'] = '$SOURCES' else: - dict['SOURCES'] = None - dict['SOURCE'] = None + dict['SOURCES'] = NullNodesList + dict['SOURCE'] = NullNodesList return dict @@ -386,11 +409,9 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ source with two methods (substitute() and expand()) that handle the expansion. """ - def __init__(self, env, mode, target, source, conv, gvars): + def __init__(self, env, mode, conv, gvars): self.env = env self.mode = mode - self.target = target - self.source = source self.conv = conv self.gvars = gvars @@ -427,14 +448,14 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ except Exception, e: if e.__class__ in AllowableExceptions: return '' - raise_exception(e, self.target, s) + raise_exception(e, lvars['TARGETS'], s) else: if lvars.has_key(key): s = lvars[key] elif self.gvars.has_key(key): s = self.gvars[key] elif not NameError in AllowableExceptions: - raise_exception(NameError(key), self.target, s) + raise_exception(NameError(key), lvars['TARGETS'], s) else: return '' @@ -460,8 +481,8 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ return map(func, s) elif callable(s): try: - s = s(target=self.target, - source=self.source, + s = s(target=lvars['TARGETS'], + source=lvars['SOURCES'], env=self.env, for_signature=(self.mode != SUBST_CMD)) except TypeError: @@ -519,10 +540,11 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ # If we dropped that behavior (or found another way to cover it), # we could get rid of this call completely and just rely on the # Executor setting the variables. - d = subst_dict(target, source) - if d: - lvars = lvars.copy() - lvars.update(d) + if not lvars.has_key('TARGET'): + d = subst_dict(target, source) + if d: + lvars = lvars.copy() + lvars.update(d) # We're (most likely) going to eval() things. If Python doesn't # find a __builtins__ value in the global dictionary used for eval(), @@ -532,7 +554,7 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ # for expansion. gvars['__builtins__'] = __builtins__ - ss = StringSubber(env, mode, target, source, conv, gvars) + ss = StringSubber(env, mode, conv, gvars) result = ss.substitute(strSubst, lvars) try: @@ -589,12 +611,10 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv and the rest of the object takes care of doing the right thing internally. """ - def __init__(self, env, mode, target, source, conv, gvars): + def __init__(self, env, mode, conv, gvars): UserList.UserList.__init__(self, []) self.env = env self.mode = mode - self.target = target - self.source = source self.conv = conv self.gvars = gvars @@ -643,14 +663,14 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv except Exception, e: if e.__class__ in AllowableExceptions: return - raise_exception(e, self.target, s) + raise_exception(e, lvars['TARGETS'], s) else: if lvars.has_key(key): s = lvars[key] elif self.gvars.has_key(key): s = self.gvars[key] elif not NameError in AllowableExceptions: - raise_exception(NameError(), self.target, s) + raise_exception(NameError(), lvars['TARGETS'], s) else: return @@ -670,8 +690,8 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv self.next_word() elif callable(s): try: - s = s(target=self.target, - source=self.source, + s = s(target=lvars['TARGETS'], + source=lvars['SOURCES'], env=self.env, for_signature=(self.mode != SUBST_CMD)) except TypeError: @@ -814,10 +834,11 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv # If we dropped that behavior (or found another way to cover it), # we could get rid of this call completely and just rely on the # Executor setting the variables. - d = subst_dict(target, source) - if d: - lvars = lvars.copy() - lvars.update(d) + if not lvars.has_key('TARGET'): + d = subst_dict(target, source) + if d: + lvars = lvars.copy() + lvars.update(d) # We're (most likely) going to eval() things. If Python doesn't # find a __builtins__ value in the global dictionary used for eval(), @@ -827,7 +848,7 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv # for expansion. gvars['__builtins__'] = __builtins__ - ls = ListSubber(env, mode, target, source, conv, gvars) + ls = ListSubber(env, mode, conv, gvars) ls.substitute(strSubst, lvars, 0) try: diff --git a/third_party/scons/scons-local/SCons/Taskmaster.py b/third_party/scons/scons-local/SCons/Taskmaster.py index 354fcca..2fffafca2 100644 --- a/third_party/scons/scons-local/SCons/Taskmaster.py +++ b/third_party/scons/scons-local/SCons/Taskmaster.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Taskmaster.py 3897 2009/01/13 06:45:54 scons" from itertools import chain import operator @@ -58,6 +58,7 @@ import traceback import SCons.Errors import SCons.Node +import SCons.Warnings StateString = SCons.Node.StateString NODE_NO_STATE = SCons.Node.no_state @@ -185,8 +186,9 @@ class Task: # target t.prepare() methods check that each target's explicit # or implicit dependencies exists, and also initialize the # .sconsign info. - self.targets[0].get_executor().prepare() - for t in self.targets: + executor = self.targets[0].get_executor() + executor.prepare() + for t in executor.get_action_targets(): t.prepare() for s in t.side_effects: s.prepare() @@ -197,14 +199,14 @@ class Task: return self.node def needs_execute(self): - """ - Called to determine whether the task's execute() method should - be run. - - This method allows one to skip the somethat costly execution - of the execute() method in a seperate thread. For example, - that would be unnecessary for up-to-date targets. - """ + # TODO(deprecate): "return True" is the old default behavior; + # change it to NotImplementedError (after running through the + # Deprecation Cycle) so the desired behavior is explicitly + # determined by which concrete subclass is used. + #raise NotImplementedError + msg = ('Direct use of the Taskmaster.Task class will be deprecated\n' + + '\tin a future release.') + SCons.Warnings.warn(SCons.Warnings.TaskmasterNeedsExecuteWarning, msg) return True def execute(self): @@ -501,6 +503,30 @@ class Task: exc_traceback = None raise exc_type, exc_value, exc_traceback +class AlwaysTask(Task): + def needs_execute(self): + """ + Always returns True (indicating this Task should always + be executed). + + Subclasses that need this behavior (as opposed to the default + of only executing Nodes that are out of date w.r.t. their + dependencies) can use this as follows: + + class MyTaskSubclass(SCons.Taskmaster.Task): + needs_execute = SCons.Taskmaster.Task.execute_always + """ + return True + +class OutOfDateTask(Task): + def needs_execute(self): + """ + Returns True (indicating this Task should be executed) if this + Task's target state indicates it needs executing, which has + already been determined by an earlier up-to-date check. + """ + return self.targets[0].get_state() == SCons.Node.executing + def find_cycle(stack, visited): if stack[-1] in visited: @@ -521,11 +547,13 @@ class Taskmaster: The Taskmaster for walking the dependency DAG. """ - def __init__(self, targets=[], tasker=Task, order=None, trace=None): + def __init__(self, targets=[], tasker=None, order=None, trace=None): self.original_top = targets self.top_targets_left = targets[:] self.top_targets_left.reverse() self.candidates = [] + if tasker is None: + tasker = OutOfDateTask self.tasker = tasker if not order: order = lambda l: l @@ -736,8 +764,10 @@ class Taskmaster: if T: T.write(self.trace_message(' already handled (executed)')) continue + executor = node.get_executor() + try: - children = node.children() + children = executor.get_all_children() except SystemExit: exc_value = sys.exc_info()[1] e = SCons.Errors.ExplicitExit(node, exc_value.code) @@ -759,7 +789,7 @@ class Taskmaster: children_not_ready = [] children_failed = False - for child in chain(children,node.prerequisites): + for child in chain(children, executor.get_all_prerequisites()): childstate = child.get_state() if T: T.write(self.trace_message(' ' + self.trace_node(child))) @@ -803,7 +833,8 @@ class Taskmaster: # added the other children to the list of candidate nodes # to keep on building (--keep-going). if children_failed: - node.set_state(NODE_FAILED) + for n in executor.get_action_targets(): + n.set_state(NODE_FAILED) if S: S.child_failed = S.child_failed + 1 if T: T.write(self.trace_message('****** %s\n' % self.trace_node(node))) @@ -834,7 +865,7 @@ class Taskmaster: # Skip this node if it has side-effects that are # currently being built: wait_side_effects = False - for se in node.side_effects: + for se in executor.get_action_side_effects(): if se.get_state() == NODE_EXECUTING: se.add_to_waiting_s_e(node) wait_side_effects = True @@ -873,7 +904,7 @@ class Taskmaster: if node is None: return None - tlist = node.get_executor().targets + tlist = node.get_executor().get_all_targets() task = self.tasker(self, tlist, node in self.original_top, node) try: diff --git a/third_party/scons/scons-local/SCons/Tool/386asm.py b/third_party/scons/scons-local/SCons/Tool/386asm.py index fc5c500..8dcb783 100644 --- a/third_party/scons/scons-local/SCons/Tool/386asm.py +++ b/third_party/scons/scons-local/SCons/Tool/386asm.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/386asm.py 3897 2009/01/13 06:45:54 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 15d1f0a..4405ef2 100644 --- a/third_party/scons/scons-local/SCons/Tool/BitKeeper.py +++ b/third_party/scons/scons-local/SCons/Tool/BitKeeper.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/BitKeeper.py 3897 2009/01/13 06:45:54 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 e1cc04d..f2e7a6b 100644 --- a/third_party/scons/scons-local/SCons/Tool/CVS.py +++ b/third_party/scons/scons-local/SCons/Tool/CVS.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/CVS.py 3897 2009/01/13 06:45:54 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 8d3204f..a81670e 100644 --- a/third_party/scons/scons-local/SCons/Tool/FortranCommon.py +++ b/third_party/scons/scons-local/SCons/Tool/FortranCommon.py @@ -5,7 +5,7 @@ Stuff for processing Fortran, common to all fortran dialects. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/FortranCommon.py 3897 2009/01/13 06:45:54 scons" import re import string @@ -67,7 +67,7 @@ def _fortranEmitter(target, source, env): mod_regex = """(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)""" cre = re.compile(mod_regex,re.M) # Retrieve all USE'd module names - modules = cre.findall(node.get_contents()) + modules = cre.findall(node.get_text_contents()) # Remove unique items from the list modules = SCons.Util.unique(modules) # Convert module name to a .mod filename diff --git a/third_party/scons/scons-local/SCons/Tool/JavaCommon.py b/third_party/scons/scons-local/SCons/Tool/JavaCommon.py index 12c31f3..35c45a2 100644 --- a/third_party/scons/scons-local/SCons/Tool/JavaCommon.py +++ b/third_party/scons/scons-local/SCons/Tool/JavaCommon.py @@ -5,7 +5,7 @@ Stuff for processing Java. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/JavaCommon.py 3897 2009/01/13 06:45:54 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 97049f6..8448d60 100644 --- a/third_party/scons/scons-local/SCons/Tool/Perforce.py +++ b/third_party/scons/scons-local/SCons/Tool/Perforce.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/Perforce.py 3897 2009/01/13 06:45:54 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 76a566a..a2dba04 100644 --- a/third_party/scons/scons-local/SCons/Tool/PharLapCommon.py +++ b/third_party/scons/scons-local/SCons/Tool/PharLapCommon.py @@ -7,7 +7,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 3897 2009/01/13 06:45:54 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 6d47060..696074d 100644 --- a/third_party/scons/scons-local/SCons/Tool/RCS.py +++ b/third_party/scons/scons-local/SCons/Tool/RCS.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/RCS.py 3897 2009/01/13 06:45:54 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 842db13..5415bf6 100644 --- a/third_party/scons/scons-local/SCons/Tool/SCCS.py +++ b/third_party/scons/scons-local/SCons/Tool/SCCS.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/SCCS.py 3897 2009/01/13 06:45:54 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 a593c6a..ca67f9a 100644 --- a/third_party/scons/scons-local/SCons/Tool/Subversion.py +++ b/third_party/scons/scons-local/SCons/Tool/Subversion.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/Subversion.py 3897 2009/01/13 06:45:54 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 0b03282..2afc54e 100644 --- a/third_party/scons/scons-local/SCons/Tool/__init__.py +++ b/third_party/scons/scons-local/SCons/Tool/__init__.py @@ -14,7 +14,7 @@ tool definition. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/__init__.py 3897 2009/01/13 06:45:54 scons" import imp import sys @@ -272,7 +272,7 @@ def createLoadableModuleBuilder(env): action_list = [ SCons.Defaults.SharedCheck, SCons.Defaults.LdModuleLinkAction ] ld_module = SCons.Builder.Builder(action = action_list, - emitter = "$SHLIBEMITTER", + emitter = "$LDMODULEEMITTER", prefix = '$LDMODULEPREFIX', suffix = '$LDMODULESUFFIX', target_scanner = ProgramScanner, diff --git a/third_party/scons/scons-local/SCons/Tool/aixc++.py b/third_party/scons/scons-local/SCons/Tool/aixc++.py index 5db91f7..2b23ea6 100644 --- a/third_party/scons/scons-local/SCons/Tool/aixc++.py +++ b/third_party/scons/scons-local/SCons/Tool/aixc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/aixc++.py 3897 2009/01/13 06:45:54 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 3c0b9d7..f42e5f3 100644 --- a/third_party/scons/scons-local/SCons/Tool/aixcc.py +++ b/third_party/scons/scons-local/SCons/Tool/aixcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/aixcc.py 3897 2009/01/13 06:45:54 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 794f7e2..2137498 100644 --- a/third_party/scons/scons-local/SCons/Tool/aixf77.py +++ b/third_party/scons/scons-local/SCons/Tool/aixf77.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/aixf77.py 3897 2009/01/13 06:45:54 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 3a1182a..5c295e7 100644 --- a/third_party/scons/scons-local/SCons/Tool/aixlink.py +++ b/third_party/scons/scons-local/SCons/Tool/aixlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/aixlink.py 3897 2009/01/13 06:45:54 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 eb8df8c..2a6e879 100644 --- a/third_party/scons/scons-local/SCons/Tool/applelink.py +++ b/third_party/scons/scons-local/SCons/Tool/applelink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/applelink.py 3897 2009/01/13 06:45:54 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 7812fb3..e9db33f 100644 --- a/third_party/scons/scons-local/SCons/Tool/ar.py +++ b/third_party/scons/scons-local/SCons/Tool/ar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/ar.py 3897 2009/01/13 06:45:54 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 623c8d7..4665824 100644 --- a/third_party/scons/scons-local/SCons/Tool/as.py +++ b/third_party/scons/scons-local/SCons/Tool/as.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/as.py 3897 2009/01/13 06:45:54 scons" import SCons.Defaults import SCons.Tool diff --git a/third_party/scons/scons-local/SCons/Tool/bcc32.py b/third_party/scons/scons-local/SCons/Tool/bcc32.py index 0488ba7..c4e9fac 100644 --- a/third_party/scons/scons-local/SCons/Tool/bcc32.py +++ b/third_party/scons/scons-local/SCons/Tool/bcc32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/bcc32.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/bcc32.py 3897 2009/01/13 06:45:54 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 9798149..22bcd943 100644 --- a/third_party/scons/scons-local/SCons/Tool/c++.py +++ b/third_party/scons/scons-local/SCons/Tool/c++.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/c++.py 3897 2009/01/13 06:45:54 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 ef1249d..d5fa905 100644 --- a/third_party/scons/scons-local/SCons/Tool/cc.py +++ b/third_party/scons/scons-local/SCons/Tool/cc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/cc.py 3897 2009/01/13 06:45:54 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 203d9e4..20928a3 100644 --- a/third_party/scons/scons-local/SCons/Tool/cvf.py +++ b/third_party/scons/scons-local/SCons/Tool/cvf.py @@ -5,7 +5,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/cvf.py 3897 2009/01/13 06:45:54 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 a105f7f..21ea4c1 100644 --- a/third_party/scons/scons-local/SCons/Tool/default.py +++ b/third_party/scons/scons-local/SCons/Tool/default.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/default.py 3897 2009/01/13 06:45:54 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 88bff8a..ef6e50c 100644 --- a/third_party/scons/scons-local/SCons/Tool/dmd.py +++ b/third_party/scons/scons-local/SCons/Tool/dmd.py @@ -32,7 +32,7 @@ Lib tool variables: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/dmd.py 3897 2009/01/13 06:45:54 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 af65671..ce2e76e 100644 --- a/third_party/scons/scons-local/SCons/Tool/dvi.py +++ b/third_party/scons/scons-local/SCons/Tool/dvi.py @@ -5,7 +5,7 @@ Common DVI Builder definition for various other Tool modules that use it. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/dvi.py 3897 2009/01/13 06:45:54 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 821d125..651e232 100644 --- a/third_party/scons/scons-local/SCons/Tool/dvipdf.py +++ b/third_party/scons/scons-local/SCons/Tool/dvipdf.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvipdf.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/dvipdf.py 3897 2009/01/13 06:45:54 scons" import SCons.Action import SCons.Defaults diff --git a/third_party/scons/scons-local/SCons/Tool/dvips.py b/third_party/scons/scons-local/SCons/Tool/dvips.py index db763f1..c772c2b 100644 --- a/third_party/scons/scons-local/SCons/Tool/dvips.py +++ b/third_party/scons/scons-local/SCons/Tool/dvips.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvips.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/dvips.py 3897 2009/01/13 06:45:54 scons" import SCons.Action import SCons.Builder diff --git a/third_party/scons/scons-local/SCons/Tool/f77.py b/third_party/scons/scons-local/SCons/Tool/f77.py index 21ab6d8..319dd96 100644 --- a/third_party/scons/scons-local/SCons/Tool/f77.py +++ b/third_party/scons/scons-local/SCons/Tool/f77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/f77.py 3897 2009/01/13 06:45:54 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 1078d2c..df4c0f5 100644 --- a/third_party/scons/scons-local/SCons/Tool/f90.py +++ b/third_party/scons/scons-local/SCons/Tool/f90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/f90.py 3897 2009/01/13 06:45:54 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 012930c..de33557 100644 --- a/third_party/scons/scons-local/SCons/Tool/f95.py +++ b/third_party/scons/scons-local/SCons/Tool/f95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/f95.py 3897 2009/01/13 06:45:54 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 dbab562..ec06020 100644 --- a/third_party/scons/scons-local/SCons/Tool/filesystem.py +++ b/third_party/scons/scons-local/SCons/Tool/filesystem.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/filesystem.py 3897 2009/01/13 06:45:54 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 aa53cf6..521137f 100644 --- a/third_party/scons/scons-local/SCons/Tool/fortran.py +++ b/third_party/scons/scons-local/SCons/Tool/fortran.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/fortran.py 3897 2009/01/13 06:45:54 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 feb3951..0af610f 100644 --- a/third_party/scons/scons-local/SCons/Tool/g++.py +++ b/third_party/scons/scons-local/SCons/Tool/g++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/g++.py 3897 2009/01/13 06:45:54 scons" import os.path import re diff --git a/third_party/scons/scons-local/SCons/Tool/g77.py b/third_party/scons/scons-local/SCons/Tool/g77.py index effc9fc..65af0ba 100644 --- a/third_party/scons/scons-local/SCons/Tool/g77.py +++ b/third_party/scons/scons-local/SCons/Tool/g77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/g77.py 3897 2009/01/13 06:45:54 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 5595e9e..c30e474 100644 --- a/third_party/scons/scons-local/SCons/Tool/gas.py +++ b/third_party/scons/scons-local/SCons/Tool/gas.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/gas.py 3897 2009/01/13 06:45:54 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 db07575..680966e 100644 --- a/third_party/scons/scons-local/SCons/Tool/gcc.py +++ b/third_party/scons/scons-local/SCons/Tool/gcc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/gcc.py 3897 2009/01/13 06:45:54 scons" import cc import os diff --git a/third_party/scons/scons-local/SCons/Tool/gfortran.py b/third_party/scons/scons-local/SCons/Tool/gfortran.py index 7da19e4..1ca840a 100644 --- a/third_party/scons/scons-local/SCons/Tool/gfortran.py +++ b/third_party/scons/scons-local/SCons/Tool/gfortran.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/gfortran.py 3897 2009/01/13 06:45:54 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 de95ee1..c4dbb1d 100644 --- a/third_party/scons/scons-local/SCons/Tool/gnulink.py +++ b/third_party/scons/scons-local/SCons/Tool/gnulink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/gnulink.py 3897 2009/01/13 06:45:54 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 c52440a..2a71968 100644 --- a/third_party/scons/scons-local/SCons/Tool/gs.py +++ b/third_party/scons/scons-local/SCons/Tool/gs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/gs.py 3897 2009/01/13 06:45:54 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 299c701..a5103f1 100644 --- a/third_party/scons/scons-local/SCons/Tool/hpc++.py +++ b/third_party/scons/scons-local/SCons/Tool/hpc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/hpc++.py 3897 2009/01/13 06:45:54 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 a4da956..4662044 100644 --- a/third_party/scons/scons-local/SCons/Tool/hpcc.py +++ b/third_party/scons/scons-local/SCons/Tool/hpcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/hpcc.py 3897 2009/01/13 06:45:54 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 0eb5b0a..da04010 100644 --- a/third_party/scons/scons-local/SCons/Tool/hplink.py +++ b/third_party/scons/scons-local/SCons/Tool/hplink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/hplink.py 3897 2009/01/13 06:45:54 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 ac6d6aa..221ac18 100644 --- a/third_party/scons/scons-local/SCons/Tool/icc.py +++ b/third_party/scons/scons-local/SCons/Tool/icc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/icc.py 3897 2009/01/13 06:45:54 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 322de79..647d541 100644 --- a/third_party/scons/scons-local/SCons/Tool/icl.py +++ b/third_party/scons/scons-local/SCons/Tool/icl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/icl.py 3897 2009/01/13 06:45:54 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 bfb157e..6087947 100644 --- a/third_party/scons/scons-local/SCons/Tool/ifl.py +++ b/third_party/scons/scons-local/SCons/Tool/ifl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/ifl.py 3897 2009/01/13 06:45:54 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 17b7bf7..e8fa8e0 100644 --- a/third_party/scons/scons-local/SCons/Tool/ifort.py +++ b/third_party/scons/scons-local/SCons/Tool/ifort.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/ifort.py 3897 2009/01/13 06:45:54 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 b443a6b..e32b79b 100644 --- a/third_party/scons/scons-local/SCons/Tool/ilink.py +++ b/third_party/scons/scons-local/SCons/Tool/ilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/ilink.py 3897 2009/01/13 06:45:54 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 f357bec..8fa6550 100644 --- a/third_party/scons/scons-local/SCons/Tool/ilink32.py +++ b/third_party/scons/scons-local/SCons/Tool/ilink32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,21 +27,21 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink32.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/ilink32.py 3897 2009/01/13 06:45:54 scons" import SCons.Tool import SCons.Tool.bcc32 import SCons.Util def generate(env): - """Add Builders and construction variables for ilink to an + """Add Builders and construction variables for Borland ilink to an Environment.""" SCons.Tool.createSharedLibBuilder(env) SCons.Tool.createProgBuilder(env) env['LINK'] = '$CC' env['LINKFLAGS'] = SCons.Util.CLVar('') - env['LINKCOM'] = '$LINK -q $LINKFLAGS $SOURCES $LIBS' + env['LINKCOM'] = '$LINK -q $LINKFLAGS -e$TARGET $SOURCES $LIBS' env['LIBDIRPREFIX']='' env['LIBDIRSUFFIX']='' env['LIBLINKPREFIX']='' diff --git a/third_party/scons/scons-local/SCons/Tool/install.py b/third_party/scons/scons-local/SCons/Tool/install.py index be36be0..28b6ad9 100644 --- a/third_party/scons/scons-local/SCons/Tool/install.py +++ b/third_party/scons/scons-local/SCons/Tool/install.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/install.py 3897 2009/01/13 06:45:54 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 dfdedc4..6fc536e 100644 --- a/third_party/scons/scons-local/SCons/Tool/intelc.py +++ b/third_party/scons/scons-local/SCons/Tool/intelc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/intelc.py 3897 2009/01/13 06:45:54 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 be50b01..638c463 100644 --- a/third_party/scons/scons-local/SCons/Tool/jar.py +++ b/third_party/scons/scons-local/SCons/Tool/jar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/jar.py 3897 2009/01/13 06:45:54 scons" import SCons.Subst import SCons.Util @@ -49,7 +49,7 @@ def jarSources(target, source, env, for_signature): jarchdir = env.fs.Dir(jarchdir) result = [] for src in source: - contents = src.get_contents() + contents = src.get_text_contents() if contents[:16] != "Manifest-Version": if jarchdir_set: _chdir = jarchdir @@ -70,7 +70,7 @@ def jarSources(target, source, env, for_signature): def jarManifest(target, source, env, for_signature): """Look in sources for a manifest file, if any.""" for src in source: - contents = src.get_contents() + contents = src.get_text_contents() if contents[:16] == "Manifest-Version": return src return '' @@ -80,7 +80,7 @@ def jarFlags(target, source, env, for_signature): flag is specified.""" jarflags = env.subst('$JARFLAGS', target=target, source=source) for src in source: - contents = src.get_contents() + contents = src.get_text_contents() if contents[:16] == "Manifest-Version": if not 'm' in jarflags: return jarflags + 'm' diff --git a/third_party/scons/scons-local/SCons/Tool/javac.py b/third_party/scons/scons-local/SCons/Tool/javac.py index b8cabe8..115ec42 100644 --- a/third_party/scons/scons-local/SCons/Tool/javac.py +++ b/third_party/scons/scons-local/SCons/Tool/javac.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/javac.py 3897 2009/01/13 06:45:54 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 3a39aeb..dbf5314 100644 --- a/third_party/scons/scons-local/SCons/Tool/javah.py +++ b/third_party/scons/scons-local/SCons/Tool/javah.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/javah.py 3897 2009/01/13 06:45:54 scons" import os.path import string @@ -103,7 +103,7 @@ def emit_java_headers(target, source, env): def JavaHOutFlagGenerator(target, source, env, for_signature): try: t = target[0] - except (AttributeError, TypeError): + except (AttributeError, IndexError, TypeError): t = target try: return '-d ' + str(t.attributes.java_lookupdir) diff --git a/third_party/scons/scons-local/SCons/Tool/latex.py b/third_party/scons/scons-local/SCons/Tool/latex.py index 549f6d3..63b093f 100644 --- a/third_party/scons/scons-local/SCons/Tool/latex.py +++ b/third_party/scons/scons-local/SCons/Tool/latex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/latex.py 3897 2009/01/13 06:45:54 scons" import SCons.Action import SCons.Defaults diff --git a/third_party/scons/scons-local/SCons/Tool/lex.py b/third_party/scons/scons-local/SCons/Tool/lex.py index f2e0e85..cd42f45 100644 --- a/third_party/scons/scons-local/SCons/Tool/lex.py +++ b/third_party/scons/scons-local/SCons/Tool/lex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/lex.py 3897 2009/01/13 06:45:54 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 d02bb25..7709c14 100644 --- a/third_party/scons/scons-local/SCons/Tool/link.py +++ b/third_party/scons/scons-local/SCons/Tool/link.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/link.py 3897 2009/01/13 06:45:54 scons" import SCons.Defaults import SCons.Tool @@ -99,10 +99,13 @@ def generate(env): # setting them the same means that LoadableModule works everywhere. SCons.Tool.createLoadableModuleBuilder(env) env['LDMODULE'] = '$SHLINK' + # don't set up the emitter, cause AppendUnique will generate a list + # starting with None :-( + env.Append(LDMODULEEMITTER='$SHLIBEMITTER') env['LDMODULEPREFIX'] = '$SHLIBPREFIX' env['LDMODULESUFFIX'] = '$SHLIBSUFFIX' env['LDMODULEFLAGS'] = '$SHLINKFLAGS' - env['LDMODULECOM'] = '$SHLINKCOM' + env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS' diff --git a/third_party/scons/scons-local/SCons/Tool/linkloc.py b/third_party/scons/scons-local/SCons/Tool/linkloc.py index b0550c6..d6eceef 100644 --- a/third_party/scons/scons-local/SCons/Tool/linkloc.py +++ b/third_party/scons/scons-local/SCons/Tool/linkloc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/linkloc.py 3897 2009/01/13 06:45:54 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 0d81d71..3a879e7 100644 --- a/third_party/scons/scons-local/SCons/Tool/m4.py +++ b/third_party/scons/scons-local/SCons/Tool/m4.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/m4.py 3897 2009/01/13 06:45:54 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 8508900..637070e 100644 --- a/third_party/scons/scons-local/SCons/Tool/masm.py +++ b/third_party/scons/scons-local/SCons/Tool/masm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/masm.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/masm.py 3897 2009/01/13 06:45:54 scons" import SCons.Defaults import SCons.Tool diff --git a/third_party/scons/scons-local/SCons/Tool/midl.py b/third_party/scons/scons-local/SCons/Tool/midl.py index df1bf9a..43ebacf 100644 --- a/third_party/scons/scons-local/SCons/Tool/midl.py +++ b/third_party/scons/scons-local/SCons/Tool/midl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/midl.py 3897 2009/01/13 06:45:54 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 faec2e9..6dbd8a01 100644 --- a/third_party/scons/scons-local/SCons/Tool/mingw.py +++ b/third_party/scons/scons-local/SCons/Tool/mingw.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/mingw.py 3897 2009/01/13 06:45:54 scons" import os import os.path @@ -62,7 +62,9 @@ def shlib_generator(target, source, env, for_signature): if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature)) def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX') - if def_target: cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature)) + insert_def = env.subst("$WINDOWS_INSERT_DEF") + if not insert_def in ['', '0', 0] and def_target: \ + cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature)) return [cmd] diff --git a/third_party/scons/scons-local/SCons/Tool/mslib.py b/third_party/scons/scons-local/SCons/Tool/mslib.py index 340f992..67bb759 100644 --- a/third_party/scons/scons-local/SCons/Tool/mslib.py +++ b/third_party/scons/scons-local/SCons/Tool/mslib.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/mslib.py 3897 2009/01/13 06:45:54 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 298ae7c..4449697 100644 --- a/third_party/scons/scons-local/SCons/Tool/mslink.py +++ b/third_party/scons/scons-local/SCons/Tool/mslink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/mslink.py 3897 2009/01/13 06:45:54 scons" import os.path @@ -50,9 +50,9 @@ def pdbGenerator(env, target, source, for_signature): except (AttributeError, IndexError): return None -def windowsShlinkTargets(target, source, env, for_signature): +def _dllTargets(target, source, env, for_signature, paramtp): listCmd = [] - dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX') + dll = env.FindIxes(target, '%sPREFIX' % paramtp, '%sSUFFIX' % paramtp) if dll: listCmd.append("/out:%s"%dll.get_string(for_signature)) implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX') @@ -60,12 +60,15 @@ def windowsShlinkTargets(target, source, env, for_signature): return listCmd -def windowsShlinkSources(target, source, env, for_signature): +def _dllSources(target, source, env, for_signature, paramtp): listCmd = [] deffile = env.FindIxes(source, "WINDOWSDEFPREFIX", "WINDOWSDEFSUFFIX") for src in source: - if src == deffile: + # Check explicitly for a non-None deffile so that the __cmp__ + # method of the base SCons.Util.Proxy class used for some Node + # proxies doesn't try to use a non-existent __dict__ attribute. + if deffile and src == deffile: # Treat this source as a .def file. listCmd.append("/def:%s" % src.get_string(for_signature)) else: @@ -73,17 +76,32 @@ def windowsShlinkSources(target, source, env, for_signature): listCmd.append(src) return listCmd -def windowsLibEmitter(target, source, env): +def windowsShlinkTargets(target, source, env, for_signature): + return _dllTargets(target, source, env, for_signature, 'SHLIB') + +def windowsShlinkSources(target, source, env, for_signature): + return _dllSources(target, source, env, for_signature, 'SHLIB') + +def _windowsLdmodTargets(target, source, env, for_signature): + """Get targets for loadable modules.""" + return _dllTargets(target, source, env, for_signature, 'LDMODULE') + +def _windowsLdmodSources(target, source, env, for_signature): + """Get sources for loadable modules.""" + return _dllSources(target, source, env, for_signature, 'LDMODULE') + +def _dllEmitter(target, source, env, paramtp): + """Common implementation of dll emitter.""" SCons.Tool.msvc.validate_vars(env) extratargets = [] extrasources = [] - dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX") + dll = env.FindIxes(target, '%sPREFIX' % paramtp, '%sSUFFIX' % paramtp) no_import_lib = env.get('no_import_lib', 0) if not dll: - raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX") + raise SCons.Errors.UserError, 'A shared library should have exactly one target with the suffix: %s' % env.subst('$%sSUFFIX' % paramtp) insert_def = env.subst("$WINDOWS_INSERT_DEF") if not insert_def in ['', '0', 0] and \ @@ -92,7 +110,7 @@ def windowsLibEmitter(target, source, env): # append a def file to the list of sources extrasources.append( env.ReplaceIxes(dll, - "SHLIBPREFIX", "SHLIBSUFFIX", + '%sPREFIX' % paramtp, '%sSUFFIX' % paramtp, "WINDOWSDEFPREFIX", "WINDOWSDEFSUFFIX")) version_num, suite = SCons.Tool.msvs.msvs_parse_version(env.get('MSVS_VERSION', '6.0')) @@ -100,7 +118,7 @@ def windowsLibEmitter(target, source, env): # MSVC 8 automatically generates .manifest files that must be installed extratargets.append( env.ReplaceIxes(dll, - "SHLIBPREFIX", "SHLIBSUFFIX", + '%sPREFIX' % paramtp, '%sSUFFIX' % paramtp, "WINDOWSSHLIBMANIFESTPREFIX", "WINDOWSSHLIBMANIFESTSUFFIX")) if env.has_key('PDB') and env['PDB']: @@ -113,16 +131,27 @@ def windowsLibEmitter(target, source, env): # Append an import library to the list of targets. extratargets.append( env.ReplaceIxes(dll, - "SHLIBPREFIX", "SHLIBSUFFIX", + '%sPREFIX' % paramtp, '%sSUFFIX' % paramtp, "LIBPREFIX", "LIBSUFFIX")) # and .exp file is created if there are exports from a DLL extratargets.append( env.ReplaceIxes(dll, - "SHLIBPREFIX", "SHLIBSUFFIX", + '%sPREFIX' % paramtp, '%sSUFFIX' % paramtp, "WINDOWSEXPPREFIX", "WINDOWSEXPSUFFIX")) return (target+extratargets, source+extrasources) +def windowsLibEmitter(target, source, env): + return _dllEmitter(target, source, env, 'SHLIB') + +def ldmodEmitter(target, source, env): + """Emitter for loadable modules. + + Loadable modules are identical to shared libraries on Windows, but building + them is subject to different parameters (LDMODULE*). + """ + return _dllEmitter(target, source, env, 'LDMODULE') + def prog_emitter(target, source, env): SCons.Tool.msvc.validate_vars(env) @@ -160,7 +189,9 @@ def RegServerFunc(target, source, env): regServerAction = SCons.Action.Action("$REGSVRCOM", "$REGSVRCOMSTR") regServerCheck = SCons.Action.Action(RegServerFunc, None) shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}') -compositeLinkAction = shlibLinkAction + regServerCheck +compositeShLinkAction = shlibLinkAction + regServerCheck +ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}') +compositeLdmodAction = ldmodLinkAction + regServerCheck def generate(env): """Add Builders and construction variables for ar to an Environment.""" @@ -171,7 +202,7 @@ def generate(env): env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll') env['_SHLINK_TARGETS'] = windowsShlinkTargets env['_SHLINK_SOURCES'] = windowsShlinkSources - env['SHLINKCOM'] = compositeLinkAction + env['SHLINKCOM'] = compositeShLinkAction env.Append(SHLIBEMITTER = [windowsLibEmitter]) env['LINK'] = 'link' env['LINKFLAGS'] = SCons.Util.CLVar('/nologo') @@ -221,19 +252,19 @@ def generate(env): except (SCons.Util.RegError, SCons.Errors.InternalError): pass - # For most platforms, a loadable module is the same as a shared - # library. Platforms which are different can override these, but - # setting them the same means that LoadableModule works everywhere. + # Loadable modules are on Windows the same as shared libraries, but they + # are subject to different build parameters (LDMODULE* variables). + # Therefore LDMODULE* variables correspond as much as possible to + # SHLINK*/SHLIB* ones. SCons.Tool.createLoadableModuleBuilder(env) env['LDMODULE'] = '$SHLINK' env['LDMODULEPREFIX'] = '$SHLIBPREFIX' env['LDMODULESUFFIX'] = '$SHLIBSUFFIX' env['LDMODULEFLAGS'] = '$SHLINKFLAGS' - # We can't use '$SHLINKCOM' here because that will stringify the - # action list on expansion, and will then try to execute expanded - # strings, with the upshot that it would try to execute RegServerFunc - # as a command. - env['LDMODULECOM'] = compositeLinkAction + env['_LDMODULE_TARGETS'] = _windowsLdmodTargets + env['_LDMODULE_SOURCES'] = _windowsLdmodSources + env['LDMODULEEMITTER'] = [ldmodEmitter] + env['LDMODULECOM'] = compositeLdmodAction def exists(env): platform = env.get('PLATFORM', '') diff --git a/third_party/scons/scons-local/SCons/Tool/msvc.py b/third_party/scons/scons-local/SCons/Tool/msvc.py index 5b7874a..16953d0 100644 --- a/third_party/scons/scons-local/SCons/Tool/msvc.py +++ b/third_party/scons/scons-local/SCons/Tool/msvc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/msvc.py 3897 2009/01/13 06:45:54 scons" import os.path import re @@ -672,40 +672,103 @@ res_builder = SCons.Builder.Builder(action=res_action, src_builder=[], source_scanner=res_scanner) +def msvc_batch_key(action, env, target, source): + """ + Returns a key to identify unique batches of sources for compilation. + + If batching is enabled (via the $MSVC_BATCH setting), then all + target+source pairs that use the same action, defined by the same + environment, and have the same target and source directories, will + be batched. + + Returning None specifies that the specified target+source should not + be batched with other compilations. + """ + b = env.subst('$MSVC_BATCH') + if b in (None, '', '0'): + # We're not using batching; return no key. + return None + t = target[0] + s = source[0] + if os.path.splitext(t.name)[0] != os.path.splitext(s.name)[0]: + # The base names are different, so this *must* be compiled + # separately; return no key. + return None + return (id(action), id(env), t.dir, s.dir) + +def msvc_output_flag(target, source, env, for_signature): + """ + Returns the correct /Fo flag for batching. + + If batching is disabled or there's only one source file, then we + return an /Fo string that specifies the target explicitly. Otherwise, + we return an /Fo string that just specifies the first target's + directory (where the Visual C/C++ compiler will put the .obj files). + """ + b = env.subst('$MSVC_BATCH') + if b in (None, '', '0') or len(source) == 1: + return '/Fo$TARGET' + else: + # The Visual C/C++ compiler requires a \ at the end of the /Fo + # option to indicate an output directory. We use os.sep here so + # that the test(s) for this can be run on non-Windows systems + # without having a hard-coded backslash mess up command-line + # argument parsing. + return '/Fo${TARGET.dir}' + os.sep + +CAction = SCons.Action.Action("$CCCOM", "$CCCOMSTR", + batch_key=msvc_batch_key, + targets='$CHANGED_TARGETS') +ShCAction = SCons.Action.Action("$SHCCCOM", "$SHCCCOMSTR", + batch_key=msvc_batch_key, + targets='$CHANGED_TARGETS') +CXXAction = SCons.Action.Action("$CXXCOM", "$CXXCOMSTR", + batch_key=msvc_batch_key, + targets='$CHANGED_TARGETS') +ShCXXAction = SCons.Action.Action("$SHCXXCOM", "$SHCXXCOMSTR", + batch_key=msvc_batch_key, + targets='$CHANGED_TARGETS') def generate(env): """Add Builders and construction variables for MSVC++ to an Environment.""" static_obj, shared_obj = SCons.Tool.createObjBuilders(env) + # TODO(batch): shouldn't reach in to cmdgen this way; necessary + # for now to bypass the checks in Builder.DictCmdGenerator.__call__() + # and allow .cc and .cpp to be compiled in the same command line. + static_obj.cmdgen.source_ext_match = False + shared_obj.cmdgen.source_ext_match = False + for suffix in CSuffixes: - static_obj.add_action(suffix, SCons.Defaults.CAction) - shared_obj.add_action(suffix, SCons.Defaults.ShCAction) + static_obj.add_action(suffix, CAction) + shared_obj.add_action(suffix, ShCAction) static_obj.add_emitter(suffix, static_object_emitter) shared_obj.add_emitter(suffix, shared_object_emitter) for suffix in CXXSuffixes: - static_obj.add_action(suffix, SCons.Defaults.CXXAction) - shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction) + static_obj.add_action(suffix, CXXAction) + shared_obj.add_action(suffix, ShCXXAction) static_obj.add_emitter(suffix, static_object_emitter) shared_obj.add_emitter(suffix, shared_object_emitter) env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Z7") or ""}']) env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}']) + env['_MSVC_OUTPUT_FLAG'] = msvc_output_flag env['_CCCOMCOM'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS' env['CC'] = 'cl' env['CCFLAGS'] = SCons.Util.CLVar('/nologo') env['CFLAGS'] = SCons.Util.CLVar('') - env['CCCOM'] = '$CC /Fo$TARGET /c $SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM' + env['CCCOM'] = '$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM' env['SHCC'] = '$CC' env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS') env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS') - env['SHCCCOM'] = '$SHCC /Fo$TARGET /c $SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM' + env['SHCCCOM'] = '$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM' env['CXX'] = '$CC' - env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)') - env['CXXCOM'] = '$CXX /Fo$TARGET /c $SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM' + env['CXXFLAGS'] = SCons.Util.CLVar('$( /TP $)') + env['CXXCOM'] = '$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM' env['SHCXX'] = '$CXX' env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS') - env['SHCXXCOM'] = '$SHCXX /Fo$TARGET /c $SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM' + env['SHCXXCOM'] = '$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM' env['CPPDEFPREFIX'] = '/D' env['CPPDEFSUFFIX'] = '' env['INCPREFIX'] = '/I' diff --git a/third_party/scons/scons-local/SCons/Tool/msvs.py b/third_party/scons/scons-local/SCons/Tool/msvs.py index f8a20ea..839aea6 100644 --- a/third_party/scons/scons-local/SCons/Tool/msvs.py +++ b/third_party/scons/scons-local/SCons/Tool/msvs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/msvs.py 3897 2009/01/13 06:45:54 scons" import base64 import hashlib diff --git a/third_party/scons/scons-local/SCons/Tool/mwcc.py b/third_party/scons/scons-local/SCons/Tool/mwcc.py index 4a6eaaa..6799cbd 100644 --- a/third_party/scons/scons-local/SCons/Tool/mwcc.py +++ b/third_party/scons/scons-local/SCons/Tool/mwcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/mwcc.py 3897 2009/01/13 06:45:54 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 890b6d0..6513984 100644 --- a/third_party/scons/scons-local/SCons/Tool/mwld.py +++ b/third_party/scons/scons-local/SCons/Tool/mwld.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/mwld.py 3897 2009/01/13 06:45:54 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 db5c107..07df8f21 100644 --- a/third_party/scons/scons-local/SCons/Tool/nasm.py +++ b/third_party/scons/scons-local/SCons/Tool/nasm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/nasm.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/nasm.py 3897 2009/01/13 06:45:54 scons" import SCons.Defaults import SCons.Tool 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 f5e313c..8be62d5 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/__init__.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/__init__.py @@ -4,7 +4,7 @@ SCons Packaging Tool. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 3897 2009/01/13 06:45:54 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 0a9c6b9..3f5d877 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/ipk.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/ipk.py @@ -2,7 +2,7 @@ """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 3897 2009/01/13 06:45:54 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 4929f81..bbfdc3f 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/msi.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/msi.py @@ -4,7 +4,7 @@ The msi packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/msi.py 3897 2009/01/13 06:45:54 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 9841559..d13ddc4 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/rpm.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/rpm.py @@ -4,7 +4,7 @@ The rpm packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 3897 2009/01/13 06:45:54 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 7dafa31..ebd5f70 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 @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 3897 2009/01/13 06:45:54 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 b60ceee..a336bbf 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 @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 3897 2009/01/13 06:45:54 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 d76f24d..33651dc 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 @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 3897 2009/01/13 06:45:54 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 69e9737..4da263f 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 3897 2009/01/13 06:45:54 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 37a8bfe..661e586 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/targz.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/targz.py 3897 2009/01/13 06:45:54 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 3cd4dd8..f85b226 100644 --- a/third_party/scons/scons-local/SCons/Tool/packaging/zip.py +++ b/third_party/scons/scons-local/SCons/Tool/packaging/zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/packaging/zip.py 3897 2009/01/13 06:45:54 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 bf6a83e..cff0742 100644 --- a/third_party/scons/scons-local/SCons/Tool/pdf.py +++ b/third_party/scons/scons-local/SCons/Tool/pdf.py @@ -6,7 +6,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdf.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/pdf.py 3897 2009/01/13 06:45:54 scons" import SCons.Builder import SCons.Tool diff --git a/third_party/scons/scons-local/SCons/Tool/pdflatex.py b/third_party/scons/scons-local/SCons/Tool/pdflatex.py index 5ffb9cb..beed56e 100644 --- a/third_party/scons/scons-local/SCons/Tool/pdflatex.py +++ b/third_party/scons/scons-local/SCons/Tool/pdflatex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/pdflatex.py 3897 2009/01/13 06:45:54 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 2a5bfcc..fc2d4fb 100644 --- a/third_party/scons/scons-local/SCons/Tool/pdftex.py +++ b/third_party/scons/scons-local/SCons/Tool/pdftex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/pdftex.py 3897 2009/01/13 06:45:54 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 c4e5ca7..2767151 100644 --- a/third_party/scons/scons-local/SCons/Tool/qt.py +++ b/third_party/scons/scons-local/SCons/Tool/qt.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/qt.py 3897 2009/01/13 06:45:54 scons" import os.path import re @@ -138,8 +138,8 @@ class _Automoc: print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp) # c or fortran source continue - #cpp_contents = comment.sub('', cpp.get_contents()) - cpp_contents = cpp.get_contents() + #cpp_contents = comment.sub('', cpp.get_text_contents()) + cpp_contents = cpp.get_text_contents() h=None for h_ext in header_extensions: # try to find the header file in the corresponding source @@ -149,8 +149,8 @@ class _Automoc: if h: if debug: print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)) - #h_contents = comment.sub('', h.get_contents()) - h_contents = h.get_contents() + #h_contents = comment.sub('', h.get_text_contents()) + h_contents = h.get_text_contents() break if not h and debug: print "scons: qt: no header for '%s'." % (str(cpp)) @@ -221,7 +221,7 @@ def uicScannerFunc(node, env, path): lookout = [] lookout.extend(env['CPPPATH']) lookout.append(str(node.rfile().dir)) - includes = re.findall("<include.*?>(.*?)</include>", node.get_contents()) + includes = re.findall("<include.*?>(.*?)</include>", node.get_text_contents()) result = [] for incFile in includes: dep = env.FindFile(incFile,lookout) diff --git a/third_party/scons/scons-local/SCons/Tool/rmic.py b/third_party/scons/scons-local/SCons/Tool/rmic.py index 03a228c..7e85803 100644 --- a/third_party/scons/scons-local/SCons/Tool/rmic.py +++ b/third_party/scons/scons-local/SCons/Tool/rmic.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/rmic.py 3897 2009/01/13 06:45:54 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 a70a6d1..8203f95 100644 --- a/third_party/scons/scons-local/SCons/Tool/rpcgen.py +++ b/third_party/scons/scons-local/SCons/Tool/rpcgen.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/rpcgen.py 3897 2009/01/13 06:45:54 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 6aadc94..6bdf566 100644 --- a/third_party/scons/scons-local/SCons/Tool/rpm.py +++ b/third_party/scons/scons-local/SCons/Tool/rpm.py @@ -11,7 +11,7 @@ tar.gz consisting of the source file and a specfile. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/rpm.py 3897 2009/01/13 06:45:54 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 0be6780..d90ee8c8 100644 --- a/third_party/scons/scons-local/SCons/Tool/sgiar.py +++ b/third_party/scons/scons-local/SCons/Tool/sgiar.py @@ -11,7 +11,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sgiar.py 3897 2009/01/13 06:45:54 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 da0efb6..3c0302e 100644 --- a/third_party/scons/scons-local/SCons/Tool/sgic++.py +++ b/third_party/scons/scons-local/SCons/Tool/sgic++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sgic++.py 3897 2009/01/13 06:45:54 scons" import SCons.Util @@ -43,7 +43,7 @@ def generate(env): cplusplus.generate(env) env['CXX'] = 'CC' - env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS -LANG:std') + env['CXXFLAGS'] = SCons.Util.CLVar('-LANG:std') env['SHCXX'] = '$CXX' env['SHOBJSUFFIX'] = '.o' env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 diff --git a/third_party/scons/scons-local/SCons/Tool/sgicc.py b/third_party/scons/scons-local/SCons/Tool/sgicc.py index 5711569..2c6516c 100644 --- a/third_party/scons/scons-local/SCons/Tool/sgicc.py +++ b/third_party/scons/scons-local/SCons/Tool/sgicc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sgicc.py 3897 2009/01/13 06:45:54 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 0036e26..e665403 100644 --- a/third_party/scons/scons-local/SCons/Tool/sgilink.py +++ b/third_party/scons/scons-local/SCons/Tool/sgilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sgilink.py 3897 2009/01/13 06:45:54 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 90dd156..4729518 100644 --- a/third_party/scons/scons-local/SCons/Tool/sunar.py +++ b/third_party/scons/scons-local/SCons/Tool/sunar.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sunar.py 3897 2009/01/13 06:45:54 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 91c0efb..9d2de954 100644 --- a/third_party/scons/scons-local/SCons/Tool/sunc++.py +++ b/third_party/scons/scons-local/SCons/Tool/sunc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunc++.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sunc++.py 3897 2009/01/13 06:45:54 scons" import SCons diff --git a/third_party/scons/scons-local/SCons/Tool/suncc.py b/third_party/scons/scons-local/SCons/Tool/suncc.py index be16238..7d0e9a8 100644 --- a/third_party/scons/scons-local/SCons/Tool/suncc.py +++ b/third_party/scons/scons-local/SCons/Tool/suncc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/suncc.py 3897 2009/01/13 06:45:54 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 f8be781..90f3f93 100644 --- a/third_party/scons/scons-local/SCons/Tool/sunf77.py +++ b/third_party/scons/scons-local/SCons/Tool/sunf77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sunf77.py 3897 2009/01/13 06:45:54 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 152e22d..d531e19 100644 --- a/third_party/scons/scons-local/SCons/Tool/sunf90.py +++ b/third_party/scons/scons-local/SCons/Tool/sunf90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sunf90.py 3897 2009/01/13 06:45:54 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 74ea2da..da71863 100644 --- a/third_party/scons/scons-local/SCons/Tool/sunf95.py +++ b/third_party/scons/scons-local/SCons/Tool/sunf95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sunf95.py 3897 2009/01/13 06:45:54 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 7efa96f..f4cd226 100644 --- a/third_party/scons/scons-local/SCons/Tool/sunlink.py +++ b/third_party/scons/scons-local/SCons/Tool/sunlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/sunlink.py 3897 2009/01/13 06:45:54 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 000b80e..3eb7535 100644 --- a/third_party/scons/scons-local/SCons/Tool/swig.py +++ b/third_party/scons/scons-local/SCons/Tool/swig.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/swig.py 3897 2009/01/13 06:45:54 scons" import os.path import re @@ -51,7 +51,17 @@ def swigSuffixEmitter(env, source): return '$SWIGCFILESUFFIX' # Match '%module test', as well as '%module(directors="1") test' -_reModule = re.compile(r'%module(?:\s*\(.*\))?\s+(.+)') +# Also allow for test to be quoted (SWIG permits double quotes, but not single) +_reModule = re.compile(r'%module(\s*\(.*\))?\s+("?)(.+)\2') + +def _find_modules(src): + """Find all modules referenced by %module lines in `src`, a SWIG .i file. + Returns a list of all modules.""" + mnames = [] + matches = _reModule.findall(open(src).read()) + for m in matches: + mnames.append(m[2]) + return mnames def _swigEmitter(target, source, env): swigflags = env.subst("$SWIGFLAGS", target=target, source=source) @@ -61,12 +71,12 @@ def _swigEmitter(target, source, env): mnames = None if "-python" in flags and "-noproxy" not in flags: if mnames is None: - mnames = _reModule.findall(open(src).read()) + mnames = _find_modules(src) target.extend(map(lambda m, d=target[0].dir: d.File(m + ".py"), mnames)) if "-java" in flags: if mnames is None: - mnames = _reModule.findall(open(src).read()) + mnames = _find_modules(src) java_files = map(lambda m: [m + ".java", m + "JNI.java"], mnames) java_files = SCons.Util.flatten(java_files) outdir = env.subst('$SWIGOUTDIR', target=target, source=source) @@ -102,7 +112,7 @@ def generate(env): env['SWIGFLAGS'] = SCons.Util.CLVar('') env['SWIGCFILESUFFIX'] = '_wrap$CFILESUFFIX' env['SWIGCXXFILESUFFIX'] = '_wrap$CXXFILESUFFIX' - env['_SWIGOUTDIR'] = '${"-outdir " + str(SWIGOUTDIR)}' + env['_SWIGOUTDIR'] = r'${"-outdir \"%s\"" % SWIGOUTDIR}' env['SWIGPATH'] = [] env['SWIGINCPREFIX'] = '-I' env['SWIGINCSUFFIX'] = '' diff --git a/third_party/scons/scons-local/SCons/Tool/tar.py b/third_party/scons/scons-local/SCons/Tool/tar.py index 7d527ee..fdf857a 100644 --- a/third_party/scons/scons-local/SCons/Tool/tar.py +++ b/third_party/scons/scons-local/SCons/Tool/tar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/tar.py 3897 2009/01/13 06:45:54 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 5a664ef..99e274d 100644 --- a/third_party/scons/scons-local/SCons/Tool/tex.py +++ b/third_party/scons/scons-local/SCons/Tool/tex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/tex.py 3897 2009/01/13 06:45:54 scons" import os.path import re @@ -128,7 +128,10 @@ modify_env_var = SCons.Scanner.LaTeX.modify_env_var def FindFile(name,suffixes,paths,env,requireExt=False): if requireExt: - name = SCons.Util.splitext(name)[0] + name,ext = SCons.Util.splitext(name) + # if the user gave an extension use it. + if ext: + name = name + ext if Verbose: print " searching for '%s' with extensions: " % name,suffixes @@ -178,6 +181,7 @@ 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) + targetext = os.path.splitext(str(target[0]))[1] targetdir = os.path.split(str(target[0]))[0] @@ -198,7 +202,7 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None # 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() + src_content = source[0].get_text_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') @@ -373,7 +377,7 @@ LaTeX_re = re.compile("\\\\document(style|class)") def is_LaTeX(flist): # Scan a file list to decide if it's TeX- or LaTeX-flavored. for f in flist: - content = f.get_contents() + content = f.get_text_contents() if LaTeX_re.search(content): return 1 return 0 @@ -422,7 +426,7 @@ def tex_pdf_emitter(target, source, env): def ScanFiles(theFile, target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir): # for theFile (a Node) update any file_tests and search for graphics files # then find all included files and call ScanFiles for each of them - content = theFile.get_contents() + content = theFile.get_text_contents() if Verbose: print " scanning ",str(theFile) @@ -430,31 +434,6 @@ def ScanFiles(theFile, target, paths, file_tests, file_tests_search, env, graphi if file_tests[i][0] == None: file_tests[i][0] = file_tests_search[i].search(content) - # For each file see if any graphics files are included - # and set up target to create ,pdf graphic - # is this is in pdflatex toolchain - graphic_files = includegraphics_re.findall(content) - if Verbose: - print "graphics files in '%s': "%str(theFile),graphic_files - for graphFile in graphic_files: - graphicNode = FindFile(graphFile,graphics_extensions,paths,env,requireExt=True) - # if building with pdflatex see if we need to build the .pdf version of the graphic file - # I should probably come up with a better way to tell which builder we are using. - if graphics_extensions == LatexGraphics: - # see if we can build this graphics file by epstopdf - graphicSrc = FindFile(graphFile,TexGraphics,paths,env,requireExt=True) - # it seems that FindFile checks with no extension added - # so if the extension is included in the name then both searches find it - # we don't want to try to build a .pdf from a .pdf so make sure src!=file wanted - if (graphicSrc != None) and (graphicSrc != graphicNode): - if Verbose: - if graphicNode == None: - print "need to build '%s' by epstopdf %s -o %s" % (graphFile,graphicSrc,graphFile) - else: - print "no need to build '%s', but source file %s exists" % (graphicNode,graphicSrc) - graphicNode = env.PDF(graphicSrc) - env.Depends(target[0],graphicNode) - # recursively call this on each of the included files inc_files = [ ] inc_files.extend( include_re.findall(content) ) @@ -498,7 +477,7 @@ def tex_emitter_core(target, source, env, graphics_extensions): env.Clean(target[0],auxfilename) env.Clean(target[0],logfilename) - content = source[0].get_contents() + content = source[0].get_text_contents() idx_exists = os.path.exists(targetbase + '.idx') nlo_exists = os.path.exists(targetbase + '.nlo') diff --git a/third_party/scons/scons-local/SCons/Tool/tlib.py b/third_party/scons/scons-local/SCons/Tool/tlib.py index 03fa99c..e4d262f 100644 --- a/third_party/scons/scons-local/SCons/Tool/tlib.py +++ b/third_party/scons/scons-local/SCons/Tool/tlib.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tlib.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/tlib.py 3897 2009/01/13 06:45:54 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 16725e1..0447ece 100644 --- a/third_party/scons/scons-local/SCons/Tool/wix.py +++ b/third_party/scons/scons-local/SCons/Tool/wix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/wix.py 3897 2009/01/13 06:45:54 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 e06c477..e9da517 100644 --- a/third_party/scons/scons-local/SCons/Tool/yacc.py +++ b/third_party/scons/scons-local/SCons/Tool/yacc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/yacc.py 3897 2009/01/13 06:45:54 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 5765fef..fea5be0 100644 --- a/third_party/scons/scons-local/SCons/Tool/zip.py +++ b/third_party/scons/scons-local/SCons/Tool/zip.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Tool/zip.py 3897 2009/01/13 06:45:54 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 1f33f97..3df734f 100644 --- a/third_party/scons/scons-local/SCons/Util.py +++ b/third_party/scons/scons-local/SCons/Util.py @@ -5,7 +5,7 @@ Various utility functions go here. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Util.py 3897 2009/01/13 06:45:54 scons" import copy import os @@ -107,18 +107,6 @@ def updrive(path): path = string.upper(drive) + rest return path -class CallableComposite(UserList): - """A simple composite callable class that, when called, will invoke all - of its contained callables with the same arguments.""" - def __call__(self, *args, **kwargs): - retvals = map(lambda x, args=args, kwargs=kwargs: apply(x, - args, - kwargs), - self.data) - if self.data and (len(self.data) == len(filter(callable, retvals))): - return self.__class__(retvals) - return NodeList(retvals) - class NodeList(UserList): """This class is almost exactly like a regular list of Nodes (actually it can hold any object), with one important difference. @@ -135,23 +123,20 @@ class NodeList(UserList): def __str__(self): return string.join(map(str, self.data)) + def __iter__(self): + return iter(self.data) + + def __call__(self, *args, **kwargs): + result = map(lambda x, args=args, kwargs=kwargs: apply(x, + args, + kwargs), + self.data) + return self.__class__(result) + def __getattr__(self, name): - if not self.data: - # If there is nothing in the list, then we have no attributes to - # pass through, so raise AttributeError for everything. - raise AttributeError, "NodeList has no attribute: %s" % name - - # Return a list of the attribute, gotten from every element - # in the list - attrList = map(lambda x, n=name: getattr(x, n), self.data) - - # Special case. If the attribute is callable, we do not want - # to return a list of callables. Rather, we want to return a - # single callable that, when called, will invoke the function on - # all elements of this list. - if self.data and (len(self.data) == len(filter(callable, attrList))): - return CallableComposite(attrList) - return self.__class__(attrList) + result = map(lambda x, n=name: getattr(x, n), self.data) + return self.__class__(result) + _get_env_var = re.compile(r'^\$([_a-zA-Z]\w*|{[_a-zA-Z]\w*})$') @@ -844,7 +829,8 @@ else: continue return None -def PrependPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): +def PrependPath(oldpath, newpath, sep = os.pathsep, + delete_existing=1, canonicalize=None): """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 @@ -861,6 +847,9 @@ def PrependPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): 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. + + If canonicalize is not None, it is applied to each element of + newpath before use. """ orig = oldpath @@ -870,10 +859,15 @@ def PrependPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): paths = string.split(paths, sep) is_list = 0 - if is_List(newpath) or is_Tuple(newpath): - newpaths = newpath - else: + if is_String(newpath): newpaths = string.split(newpath, sep) + elif not is_List(newpath) and not is_Tuple(newpath): + newpaths = [ newpath ] # might be a Dir + else: + newpaths = newpath + + if canonicalize: + newpaths=map(canonicalize, newpaths) if not delete_existing: # First uniquify the old paths, making sure to @@ -917,7 +911,8 @@ def PrependPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): else: return string.join(paths, sep) -def AppendPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): +def AppendPath(oldpath, newpath, sep = os.pathsep, + delete_existing=1, canonicalize=None): """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 @@ -933,6 +928,9 @@ def AppendPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): 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. + + If canonicalize is not None, it is applied to each element of + newpath before use. """ orig = oldpath @@ -942,10 +940,15 @@ def AppendPath(oldpath, newpath, sep = os.pathsep, delete_existing=1): paths = string.split(paths, sep) is_list = 0 - if is_List(newpath) or is_Tuple(newpath): - newpaths = newpath - else: + if is_String(newpath): newpaths = string.split(newpath, sep) + elif not is_List(newpath) and not is_Tuple(newpath): + newpaths = [ newpath ] # might be a Dir + else: + newpaths = newpath + + if canonicalize: + newpaths=map(canonicalize, newpaths) if not delete_existing: # add old paths to result, then @@ -1089,11 +1092,12 @@ class Selector(OrderedDict): """A callable ordered dictionary that maps file suffixes to dictionary values. We preserve the order in which items are added so that get_suffix() calls always return the first suffix added.""" - def __call__(self, env, source): - try: - ext = source[0].suffix - except IndexError: - ext = "" + def __call__(self, env, source, ext=None): + if ext is None: + try: + ext = source[0].suffix + except IndexError: + ext = "" try: return self[ext] except KeyError: @@ -1549,9 +1553,10 @@ def MD5collect(signatures): # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/68205 # ASPN: Python Cookbook: Null Object Design Pattern +# TODO(1.5): +#class Null(object): class Null: - """ Null objects always and reliably "do nothging." """ - + """ Null objects always and reliably "do nothing." """ def __new__(cls, *args, **kwargs): if not '_inst' in vars(cls): #cls._inst = type.__new__(cls, *args, **kwargs) @@ -1562,16 +1567,27 @@ class Null: def __call__(self, *args, **kwargs): return self def __repr__(self): - return "Null()" + return "Null(0x%08X)" % id(self) def __nonzero__(self): return False - def __getattr__(self, mname): + def __getattr__(self, name): return self def __setattr__(self, name, value): return self def __delattr__(self, name): return self +class NullSeq(Null): + def __len__(self): + return 0 + def __iter__(self): + return iter(()) + def __getitem__(self, i): + return self + def __delitem__(self, i): + return self + def __setitem__(self, i, v): + return self del __revision__ diff --git a/third_party/scons/scons-local/SCons/Variables/BoolVariable.py b/third_party/scons/scons-local/SCons/Variables/BoolVariable.py index 3aaf694..8272d48 100644 --- a/third_party/scons/scons-local/SCons/Variables/BoolVariable.py +++ b/third_party/scons/scons-local/SCons/Variables/BoolVariable.py @@ -12,7 +12,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Variables/BoolVariable.py 3897 2009/01/13 06:45:54 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 6d2252d..2e77723 100644 --- a/third_party/scons/scons-local/SCons/Variables/EnumVariable.py +++ b/third_party/scons/scons-local/SCons/Variables/EnumVariable.py @@ -15,7 +15,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Variables/EnumVariable.py 3897 2009/01/13 06:45:54 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 72e6fec..5e2790d 100644 --- a/third_party/scons/scons-local/SCons/Variables/ListVariable.py +++ b/third_party/scons/scons-local/SCons/Variables/ListVariable.py @@ -25,7 +25,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Variables/ListVariable.py 3897 2009/01/13 06:45:54 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 5823bf5..8274231 100644 --- a/third_party/scons/scons-local/SCons/Variables/PackageVariable.py +++ b/third_party/scons/scons-local/SCons/Variables/PackageVariable.py @@ -28,7 +28,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Variables/PackageVariable.py 3897 2009/01/13 06:45:54 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 752e347..b93b448 100644 --- a/third_party/scons/scons-local/SCons/Variables/PathVariable.py +++ b/third_party/scons/scons-local/SCons/Variables/PathVariable.py @@ -46,7 +46,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Variables/PathVariable.py 3897 2009/01/13 06:45:54 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 5d73e10..1ee31ca 100644 --- a/third_party/scons/scons-local/SCons/Variables/__init__.py +++ b/third_party/scons/scons-local/SCons/Variables/__init__.py @@ -5,7 +5,7 @@ customizable variables to an SCons build. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Variables/__init__.py 3897 2009/01/13 06:45:54 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 296d6d3..86819cfd 100644 --- a/third_party/scons/scons-local/SCons/Warnings.py +++ b/third_party/scons/scons-local/SCons/Warnings.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ This file implements the warnings framework for SCons. """ -__revision__ = "src/engine/SCons/Warnings.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/Warnings.py 3897 2009/01/13 06:45:54 scons" import string import sys @@ -37,6 +37,21 @@ import SCons.Errors class Warning(SCons.Errors.UserError): pass +class MandatoryWarning(Warning): + pass + + + +class FutureDeprecatedWarning(Warning): + pass + +class DeprecatedWarning(Warning): + pass + +class MandatoryDeprecatedWarning(MandatoryWarning): + pass + + # NOTE: If you add a new warning class, add it to the man page, too! @@ -49,9 +64,6 @@ class CorruptSConsignWarning(Warning): class DependencyWarning(Warning): pass -class DeprecatedWarning(Warning): - pass - class DeprecatedCopyWarning(DeprecatedWarning): pass @@ -100,6 +112,9 @@ class ReservedVariableWarning(Warning): class StackSizeWarning(Warning): pass +class TaskmasterNeedsExecuteWarning(FutureDeprecatedWarning): + pass + class FortranCxxMixWarning(LinkWarning): pass @@ -189,5 +204,8 @@ def process_warn_strings(arguments): else: if enable: enableWarningClass(clazz) + elif issubclass(clazz, MandatoryDeprecatedWarning): + fmt = "Can not disable mandataory warning: '%s'\n" + sys.stderr.write(fmt % arg) else: suppressWarningClass(clazz) diff --git a/third_party/scons/scons-local/SCons/__init__.py b/third_party/scons/scons-local/SCons/__init__.py index c006699..17d4eed 100644 --- a/third_party/scons/scons-local/SCons/__init__.py +++ b/third_party/scons/scons-local/SCons/__init__.py @@ -5,7 +5,7 @@ The main package for the SCons software construction utility. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/__init__.py 3897 2009/01/13 06:45:54 scons" -__version__ = "1.2.0" +__version__ = "1.2.0.d20090113" -__build__ = "r3842" +__build__ = "r3897" __buildsys__ = "scons-dev" -__date__ = "2008/12/20 22:59:52" +__date__ = "2009/01/13 06:45:54" __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 c285db3..060a9b7 100644 --- a/third_party/scons/scons-local/SCons/compat/__init__.py +++ b/third_party/scons/scons-local/SCons/compat/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/compat/__init__.py 3897 2009/01/13 06:45:54 scons" def import_as(module, name): """ 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 cde813d9..577e00d 100644 --- a/third_party/scons/scons-local/SCons/compat/_scons_UserString.py +++ b/third_party/scons/scons-local/SCons/compat/_scons_UserString.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/compat/_scons_UserString.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/compat/_scons_UserString.py 3897 2009/01/13 06:45:54 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 97bf8d9..f4f277d 100644 --- a/third_party/scons/scons-local/SCons/compat/_scons_hashlib.py +++ b/third_party/scons/scons-local/SCons/compat/_scons_hashlib.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 3897 2009/01/13 06:45:54 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 145a7f9..479e5f6 100644 --- a/third_party/scons/scons-local/SCons/compat/_scons_itertools.py +++ b/third_party/scons/scons-local/SCons/compat/_scons_itertools.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/compat/_scons_itertools.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/compat/_scons_itertools.py 3897 2009/01/13 06:45:54 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 8ae38b6..ea86be2 100644 --- a/third_party/scons/scons-local/SCons/compat/builtins.py +++ b/third_party/scons/scons-local/SCons/compat/builtins.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/compat/builtins.py 3897 2009/01/13 06:45:54 scons" import __builtin__ diff --git a/third_party/scons/scons-local/SCons/cpp.py b/third_party/scons/scons-local/SCons/cpp.py index 1980956..dcc6751 100644 --- a/third_party/scons/scons-local/SCons/cpp.py +++ b/third_party/scons/scons-local/SCons/cpp.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/cpp.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/cpp.py 3897 2009/01/13 06:45:54 scons" __doc__ = """ SCons C Pre-Processor module diff --git a/third_party/scons/scons-local/SCons/exitfuncs.py b/third_party/scons/scons-local/SCons/exitfuncs.py index 2feb86c..ca3add0 100644 --- a/third_party/scons/scons-local/SCons/exitfuncs.py +++ b/third_party/scons/scons-local/SCons/exitfuncs.py @@ -5,7 +5,7 @@ Register functions which are executed when SCons exits for any reason. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -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 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/engine/SCons/exitfuncs.py 3897 2009/01/13 06:45:54 scons" diff --git a/third_party/scons/scons-time.py b/third_party/scons/scons-time.py index 67b6643..d76d931 100644 --- a/third_party/scons/scons-time.py +++ b/third_party/scons/scons-time.py @@ -9,7 +9,7 @@ # # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -33,7 +33,7 @@ from __future__ import nested_scopes -__revision__ = "src/script/scons-time.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/script/scons-time.py 3897 2009/01/13 06:45:54 scons" import getopt import glob diff --git a/third_party/scons/scons.py b/third_party/scons/scons.py index 88276a4..3f3c35a 100755 --- a/third_party/scons/scons.py +++ b/third_party/scons/scons.py @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,15 +24,15 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/script/scons.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/script/scons.py 3897 2009/01/13 06:45:54 scons" -__version__ = "1.2.0" +__version__ = "1.2.0.d20090113" -__build__ = "r3842" +__build__ = "r3897" __buildsys__ = "scons-dev" -__date__ = "2008/12/20 22:59:52" +__date__ = "2009/01/13 06:45:54" __developer__ = "scons" diff --git a/third_party/scons/sconsign.py b/third_party/scons/sconsign.py index a33b7b4..b28f029 100644 --- a/third_party/scons/sconsign.py +++ b/third_party/scons/sconsign.py @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,15 +24,15 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/script/sconsign.py 3842 2008/12/20 22:59:52 scons" +__revision__ = "src/script/sconsign.py 3897 2009/01/13 06:45:54 scons" -__version__ = "1.2.0" +__version__ = "1.2.0.d20090113" -__build__ = "r3842" +__build__ = "r3897" __buildsys__ = "scons-dev" -__date__ = "2008/12/20 22:59:52" +__date__ = "2009/01/13 06:45:54" __developer__ = "scons" |