summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-01-18 19:33:53 (GMT)
committerSteven Knight <knight@baldmt.com>2009-01-18 19:33:53 (GMT)
commit6d699199b32405f27c8e76b5164bdc57fcd69602 (patch)
tree05c369c0cf64c9d7514b08db774ba6512cc587ca /src/engine
parent79a086c22c6964a04ab88a382aaba3626c216b5a (diff)
downloadSCons-6d699199b32405f27c8e76b5164bdc57fcd69602.zip
SCons-6d699199b32405f27c8e76b5164bdc57fcd69602.tar.gz
SCons-6d699199b32405f27c8e76b5164bdc57fcd69602.tar.bz2
Various Windows fixes:
* Restore correct code to detect a bad drive on Windows. * Update the bad drive error message to include the target name. * Update SConfTests.py to print the config.log on error. * Fix the smart_link() error message to not use repr() of a path so escaping the \ separators on Windows doesn't interfere with regex matchs. * Update regexes in test/VariantDir/reflect.py to accomodate command-line re-ordering to put the /OUT: first in the line. * Explicitly check for smart_link() messages even on Windows.
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Node/FS.py9
-rw-r--r--src/engine/SCons/SConfTests.py26
-rw-r--r--src/engine/SCons/Tool/link.py4
3 files changed, 29 insertions, 10 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 9da9d8e..3742f34 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -1601,9 +1601,12 @@ class Dir(Base):
if parent.exists():
break
listDirs.append(parent)
- parent = parent.up()
- else:
- raise SCons.Errors.StopError, parent.path
+ p = parent.up()
+ if p is None:
+ # Don't use while: - else: for this condition because
+ # if so, then parent is None and has no .path attribute.
+ raise SCons.Errors.StopError, parent.path
+ parent = p
listDirs.reverse()
for dirnode in listDirs:
try:
diff --git a/src/engine/SCons/SConfTests.py b/src/engine/SCons/SConfTests.py
index 4fc657e..f5b53f1 100644
--- a/src/engine/SCons/SConfTests.py
+++ b/src/engine/SCons/SConfTests.py
@@ -334,7 +334,7 @@ int main() {
# Check that Check* does fail if CFLAGS is buggy
self.scons_env[comp] = oldcomp
- self.scons_env['%sFLAGS' % comp] = 'qwertyuiop'
+ self.scons_env['%sFLAGS' % comp] = '/WX qwertyuiop.c'
r = func()
assert not r, "%s worked with %sFLAGS = qwertyuiop ?" % (name, comp)
@@ -346,7 +346,11 @@ int main() {
conf_dir=self.test.workpath('config.tests'),
log_file=self.test.workpath('config.log'))
try:
- self._test_check_compilers('CC', sconf.CheckCC, 'CheckCC')
+ try:
+ self._test_check_compilers('CC', sconf.CheckCC, 'CheckCC')
+ except AssertionError:
+ sys.stderr.write(self.test.read('config.log'))
+ raise
finally:
sconf.Finish()
@@ -358,7 +362,11 @@ int main() {
conf_dir=self.test.workpath('config.tests'),
log_file=self.test.workpath('config.log'))
try:
- self._test_check_compilers('SHCC', sconf.CheckSHCC, 'CheckSHCC')
+ try:
+ self._test_check_compilers('SHCC', sconf.CheckSHCC, 'CheckSHCC')
+ except AssertionError:
+ sys.stderr.write(self.test.read('config.log'))
+ raise
finally:
sconf.Finish()
@@ -370,7 +378,11 @@ int main() {
conf_dir=self.test.workpath('config.tests'),
log_file=self.test.workpath('config.log'))
try:
- self._test_check_compilers('CXX', sconf.CheckCXX, 'CheckCXX')
+ try:
+ self._test_check_compilers('CXX', sconf.CheckCXX, 'CheckCXX')
+ except AssertionError:
+ sys.stderr.write(self.test.read('config.log'))
+ raise
finally:
sconf.Finish()
@@ -382,7 +394,11 @@ int main() {
conf_dir=self.test.workpath('config.tests'),
log_file=self.test.workpath('config.log'))
try:
- self._test_check_compilers('SHCXX', sconf.CheckSHCXX, 'CheckSHCXX')
+ try:
+ self._test_check_compilers('SHCXX', sconf.CheckSHCXX, 'CheckSHCXX')
+ except AssertionError:
+ sys.stderr.write(self.test.read('config.log'))
+ raise
finally:
sconf.Finish()
diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py
index b11be76..d0fe86c 100644
--- a/src/engine/SCons/Tool/link.py
+++ b/src/engine/SCons/Tool/link.py
@@ -51,10 +51,10 @@ def smart_link(source, target, env, for_signature):
global issued_mixed_link_warning
if not issued_mixed_link_warning:
msg = "Using $CXX to link Fortran and C++ code together.\n\t" + \
- "This may generate a buggy executable if the %s\n\t" + \
+ "This may generate a buggy executable if the '%s'\n\t" + \
"compiler does not know how to deal with Fortran runtimes."
SCons.Warnings.warn(SCons.Warnings.FortranCxxMixWarning,
- msg % repr(env.subst('$CXX')))
+ msg % env.subst('$CXX'))
issued_mixed_link_warning = True
return '$CXX'
elif has_fortran: