diff options
author | Steven Knight <knight@baldmt.com> | 2009-01-09 16:43:32 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-01-09 16:43:32 (GMT) |
commit | 7ab76c68556e5f6f142515872ea6334e959b8626 (patch) | |
tree | c4d23aed9df4381a24cac247b11dd1a4c245908a /src/engine/SCons/Util.py | |
parent | e04fb604484cf37da383a38ef9b2bd8c9ef6c175 (diff) | |
download | SCons-7ab76c68556e5f6f142515872ea6334e959b8626.zip SCons-7ab76c68556e5f6f142515872ea6334e959b8626.tar.gz SCons-7ab76c68556e5f6f142515872ea6334e959b8626.tar.bz2 |
Issue 1086: add support for generic batch build actions, and
specific support for batched compilation for Microsoft Visual C/C++.
Merged revisions 3819-3851,3854-3869,3871-3877,3880 via svnmerge from
http://scons.tigris.org/svn/scons/branches/sgk_batch
........
r3820 | stevenknight | 2008-12-09 23:59:14 -0800 (Tue, 09 Dec 2008) | 6 lines
Issue 1086: Batch compilation support:
* $MSVC_BATCH to control Visual C/C++ batch compilation.
* New $CHANGED_SOURCES, $CHANGED_TARGETS, $UNCHANGED_SOURCES and
$UNCHANGED_TARGETS construction variables.
* New Action(batch_key=, targets=) keyword arguments.
........
r3880 | stevenknight | 2009-01-07 20:50:41 -0800 (Wed, 07 Jan 2009) | 3 lines
Use UniqueList objects to collect the all_children(), all_prerequisites()
and all_sources() lists instead of calling uniquer_hashables() by hand.
........
Diffstat (limited to 'src/engine/SCons/Util.py')
-rw-r--r-- | src/engine/SCons/Util.py | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index cbec5dd..a9f7b70 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -1092,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: @@ -1561,20 +1562,32 @@ class Null: #cls._inst = type.__new__(cls, *args, **kwargs) cls._inst = apply(type.__new__, (cls,) + args, kwargs) return cls._inst - def __init__(self, *args, **kwargs): pass - def __call__(self, *args, **kwargs): return self - def __repr__(self): return "Null(0x%08X)" % id(self) - def __nonzero__(self): return False - def __getattr__(self, mname): return self - def __setattr__(self, name, value): return self - def __delattr__(self, name): return self + def __init__(self, *args, **kwargs): + pass + def __call__(self, *args, **kwargs): + return self + def __repr__(self): + return "Null(0x%08X)" % id(self) + def __nonzero__(self): + return False + 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 + 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__ |