diff options
Diffstat (limited to 'src/engine/SCons/Builder.py')
-rw-r--r-- | src/engine/SCons/Builder.py | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index ff31c5e..6164a55 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -39,9 +39,6 @@ used by other modules: variable. This also takes care of warning about possible mistakes in keyword arguments. - targets() - Returns the list of targets for a specific builder instance. - add_emitter() Adds an emitter for a specific file suffix, used by some Tool modules to specify that (for example) a yacc invocation on a .y @@ -367,6 +364,7 @@ class BuilderBase: chdir = _null, is_explicit = 1, src_builder = [], + ensure_suffix = False, **overrides): if __debug__: logInstanceCreation(self, 'Builder.BuilderBase') self._memo = {} @@ -394,6 +392,7 @@ class BuilderBase: self.set_suffix(suffix) self.set_src_suffix(src_suffix) + self.ensure_suffix = ensure_suffix self.target_factory = target_factory self.source_factory = source_factory @@ -467,7 +466,7 @@ class BuilderBase: executor.add_sources(slist) return executor - def _adjustixes(self, files, pre, suf): + def _adjustixes(self, files, pre, suf, ensure_suffix=False): if not files: return [] result = [] @@ -476,7 +475,7 @@ class BuilderBase: for f in files: if SCons.Util.is_String(f): - f = SCons.Util.adjustixes(f, pre, suf) + f = SCons.Util.adjustixes(f, pre, suf, ensure_suffix) result.append(f) return result @@ -505,7 +504,7 @@ class BuilderBase: splitext = lambda S,self=self,env=env: self.splitext(S,env) tlist = [ t_from_s(pre, suf, splitext) ] else: - target = self._adjustixes(target, pre, suf) + target = self._adjustixes(target, pre, suf, self.ensure_suffix) tlist = env.arg2nodes(target, target_factory) if self.emitter: @@ -652,13 +651,6 @@ class BuilderBase: return '' return ret[0] - def targets(self, node): - """Return the list of targets for this builder instance. - - For most normal builders, this is just the supplied node. - """ - return [ node ] - def add_emitter(self, suffix, emitter): """Add a suffix-emitter mapping to this Builder. @@ -669,16 +661,6 @@ class BuilderBase: """ self.emitter[suffix] = emitter - def push_emitter(self, emitter): - """Add a emitter to the beginning of the emitter list of this Builder. - - This creates an empty list if the emitter is None. - """ - if not self.emitter: - self.emitter = ListEmitter( [emitter] ) - else: - self.emitter.insert(0, emitter) - def add_src_builder(self, builder): """ Add a new Builder to the list of src_builders. |