summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-08-26 12:55:22 (GMT)
committerSteven Knight <knight@baldmt.com>2008-08-26 12:55:22 (GMT)
commit0307a78b041c16b5e9ad60c19f669e856f32f49f (patch)
treeca4759db03d83fd713566e90877b104e9d8d590c /src
parent5e7a97bda2ba7f206c231a28276a237b030da386 (diff)
downloadSCons-0307a78b041c16b5e9ad60c19f669e856f32f49f.zip
SCons-0307a78b041c16b5e9ad60c19f669e856f32f49f.tar.gz
SCons-0307a78b041c16b5e9ad60c19f669e856f32f49f.tar.bz2
Issue 2099: have Execute() print an error message if an action
fails. Better document the behavior of returning the exit status, and that exit-on-failure is the SConscript writer's responsibility.
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Environment.py5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 292c741..05c7f96 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -24,6 +24,9 @@ RELEASE 1.0.0 - XXX
- Document the GetLaunchDir() function in the User's Guide.
+ - Have the env.Execute() method print an error message if the
+ executed command fails.
+
From Greg Noel:
- Handle yacc/bison on newer Mac OS X versions creating file.hpp,
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index f972550..db69d62 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -1813,6 +1813,11 @@ class Base(SubstitutionEnvironment):
action = apply(self.Action, (action,) + args, kw)
result = action([], [], self)
if isinstance(result, SCons.Errors.BuildError):
+ errstr = result.errstr
+ if result.filename:
+ errstr = result.filename + ': ' + errstr
+ import sys
+ sys.stderr.write("scons: *** %s\n" % errstr)
return result.status
else:
return result