summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-06-05 04:24:06 (GMT)
committerSteven Knight <knight@baldmt.com>2002-06-05 04:24:06 (GMT)
commit96deb800e046dc86f4ce7d99350007bbce205d7e (patch)
treec252cc52f44aa006aec888a703d4f78d69e1fde3
parent549e4f245d3dd789fa7eef16e43299a4766ec2cd (diff)
downloadSCons-96deb800e046dc86f4ce7d99350007bbce205d7e.zip
SCons-96deb800e046dc86f4ce7d99350007bbce205d7e.tar.gz
SCons-96deb800e046dc86f4ce7d99350007bbce205d7e.tar.bz2
Print an error message if a file can't be unlinked before being built, rather than just silently terminating the build. (Anthony Roach)
-rw-r--r--src/CHANGES.txt9
-rw-r--r--src/engine/SCons/Script/__init__.py3
-rw-r--r--test/Install.py18
3 files changed, 27 insertions, 3 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 0d8e475..fbe895b 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -24,6 +24,10 @@ RELEASE 0.08 -
- Updated README instructions and setup.py code to catch an
installation failure from not having distutils installed.
+ From Jeff Petkau:
+
+ - Fix --implicit-cache if the scanner returns an empty list.
+
From Anthony Roach:
- Add a "multi" keyword argument to Builder creation that specifies
@@ -54,9 +58,8 @@ RELEASE 0.08 -
- Added a --debug=time option to print SCons execution times.
- From Jeff Petkau:
-
- - Fix --implicit-cache if the scanner returns an empty list.
+ - Print an error message if a file can't be unlinked before being
+ built, rather than just silently terminating the build.
From Zed Shaw:
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index e58d2d0..c42a700 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -92,6 +92,9 @@ class BuildTask(SCons.Taskmaster.Task):
traceback.print_exception(e.args[0], e.args[1],
e.args[2])
raise
+ except:
+ sys.stderr.write("scons: *** %s\n" % sys.exc_value)
+ raise
def executed(self):
SCons.Taskmaster.Task.executed(self)
diff --git a/test/Install.py b/test/Install.py
index d80be11..3a3c2bc 100644
--- a/test/Install.py
+++ b/test/Install.py
@@ -31,8 +31,10 @@ import TestSCons
if sys.platform == 'win32':
_exe = '.exe'
+ _obj = '.obj'
else:
_exe = ''
+ _obj = '.o'
test = TestSCons.TestSCons()
@@ -93,4 +95,20 @@ test.run(arguments = '.')
test.fail_test(oldtime1 == os.path.getmtime(foo1))
test.fail_test(oldtime2 != os.path.getmtime(foo2))
+# Verify that scons prints an error message if a target can not be unlinked before
+# building it:
+test.write('f1.c', r"""
+#include <stdio.h>
+
+int main(void)
+{
+ printf("f1.c again again\n");
+ return 0;
+}
+""")
+
+os.chmod(test.workpath('.'), 0555)
+
+test.run(arguments = foo1, stderr="scons: *** [Errno 13] Permission denied: 'f1%s'\n"%_obj, status=2)
+
test.pass_test()