diff options
Diffstat (limited to 'src/engine/SCons/Builder.py')
-rw-r--r-- | src/engine/SCons/Builder.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index f19983d..2d5828a 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -83,17 +83,17 @@ class DictCmdGenerator: for src in map(str, source): my_ext = SCons.Util.splitext(src)[1] if ext and my_ext != ext: - raise UserError("Cannot build multiple sources with different extensions: %s, %s" % (ext, my_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 - if ext is None: - raise UserError("Cannot deduce file extension from source files: %s" % repr(map(str, source))) + if not ext: + raise UserError("While building `%s': Cannot deduce file extension from source files: %s" % (repr(map(str, target)), repr(map(str, source)))) try: # XXX Do we need to perform Environment substitution # on the keys of action_dict before looking it up? return self.action_dict[ext] except KeyError: - raise UserError("Don't know how to build a file with suffix %s." % ext) + raise UserError("While building `%s': Don't know how to build a file with suffix %s." % (repr(map(str, target)), repr(ext))) def __cmp__(self, other): return cmp(self.action_dict, other.action_dict) |