From b0656def14f9b2f7feff88301420c1dee99ac670 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 24 Feb 2004 16:03:09 +0000 Subject: Better error message when a source file is missing. --- src/CHANGES.txt | 3 +++ src/engine/SCons/Node/__init__.py | 2 +- test/Alias.py | 2 +- test/bad-drive.py | 4 ++-- test/nonexistent.py | 6 +++--- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index be8dfa0..9e74314 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -186,6 +186,9 @@ RELEASE 0.95 - XXX having the same string re-appended to the end, yielding an incorrect path name. + - Supply a more descriptive error message when the source for a target + can't be found. + From Vincent Risi: - Add support for the bcc32, ilink32 and tlib Borland tools. diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 88aa120..861b554 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -598,7 +598,7 @@ class Node: not node.rexists() missing_sources = filter(missing, self.children()) if missing_sources: - desc = "No Builder for target `%s', needed by `%s'." % (missing_sources[0], self) + desc = "Source `%s' not found, needed by target `%s'." % (missing_sources[0], self) raise SCons.Errors.StopError, desc def remove(self): diff --git a/test/Alias.py b/test/Alias.py index 2a14c02..631aa30 100644 --- a/test/Alias.py +++ b/test/Alias.py @@ -171,7 +171,7 @@ env.Alias('A', 'B') """) test.run(arguments='A', - stderr="scons: \\*\\*\\* No Builder for target `D', needed by `C'. Stop.\n", + stderr="scons: \\*\\*\\* Source `D' not found, needed by target `C'. Stop.\n", status=2) test.pass_test() diff --git a/test/bad-drive.py b/test/bad-drive.py index d7a820f..612b24b 100644 --- a/test/bad-drive.py +++ b/test/bad-drive.py @@ -94,11 +94,11 @@ test.run(arguments = bad_drive + 'no_target_1', status = 2) test.run(arguments = bad_drive + 'no_target_2', - stderr = "scons: *** No Builder for target `ccc.does_not_exist', needed by `%sno_target_2'. Stop.\n" % bad_drive, + stderr = "scons: *** Source `ccc.does_not_exist' not found, needed by target `%sno_target_2'. Stop.\n" % bad_drive, status = 2) test.run(arguments = 'ddd.out', - stderr = "scons: *** No Builder for target `%sno_source', needed by `ddd.out'. Stop.\n" % bad_drive, + stderr = "scons: *** Source `%sno_source' not found, needed by target `ddd.out'. Stop.\n" % bad_drive, status = 2) test.pass_test() diff --git a/test/nonexistent.py b/test/nonexistent.py index 05dd9d0..3e47cbe 100644 --- a/test/nonexistent.py +++ b/test/nonexistent.py @@ -54,12 +54,12 @@ test.run(arguments = '-k foo/bar foo', status = 2) test.run(arguments = "aaa.out", - stderr = "scons: *** No Builder for target `aaa.in', needed by `aaa.out'. Stop.\n", + stderr = "scons: *** Source `aaa.in' not found, needed by target `aaa.out'. Stop.\n", status = 2) test.run(arguments = "-k bbb.out aaa.out", - stderr = """scons: *** No Builder for target `bbb.in', needed by `bbb.out'. -scons: *** No Builder for target `aaa.in', needed by `aaa.out'. + stderr = """scons: *** Source `bbb.in' not found, needed by target `bbb.out'. +scons: *** Source `aaa.in' not found, needed by target `aaa.out'. """, status = 2) -- cgit v0.12