From 5435fda557bf4baeea49754a360f93e63760346a Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Mon, 20 Feb 2012 02:28:10 +0100 Subject: [PATCH] Optimize the processing of the targets in bld(rule=) --- waflib/TaskGen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py index 323d3ca0..04dd201e 100644 --- a/waflib/TaskGen.py +++ b/waflib/TaskGen.py @@ -750,7 +750,8 @@ def process_subst(self): tgt = getattr(self, 'target', []) if isinstance(tgt, self.path.__class__): tgt = [tgt] - tgt = [isinstance(x, self.path.__class__) and x or self.path.find_or_declare(x) for x in Utils.to_list(tgt)] + else: + tgt = [isinstance(x, self.path.__class__) and x or self.path.find_or_declare(x) for x in Utils.to_list(tgt)] if len(src) != len(tgt): raise Errors.WafError('invalid source or target for %r' % self)