summaryrefslogtreecommitdiff
path: root/engine/SCons/Builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Builder.py')
-rw-r--r--engine/SCons/Builder.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/SCons/Builder.py b/engine/SCons/Builder.py
index fb41ae4..bf35b1e 100644
--- a/engine/SCons/Builder.py
+++ b/engine/SCons/Builder.py
@@ -98,7 +98,7 @@ There are the following methods for internal use within this module:
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Builder.py 4629 2010/01/17 22:23:21 scons"
+__revision__ = "src/engine/SCons/Builder.py 4691 2010/03/06 16:22:36 bdbaddog"
import UserDict
import UserList
@@ -861,6 +861,16 @@ class CompositeBuilder(SCons.Util.Proxy):
self.cmdgen.add_action(suffix, action)
self.set_src_suffix(self.cmdgen.src_suffixes())
+def is_a_Builder(obj):
+ """"Returns True iff the specified obj is one of our Builder classes.
+
+ The test is complicated a bit by the fact that CompositeBuilder
+ is a proxy, not a subclass of BuilderBase.
+ """
+ return (isinstance(obj, BuilderBase)
+ or isinstance(obj, CompositeBuilder)
+ or callable(obj))
+
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil