summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-10-10 02:49:11 (GMT)
committerSteven Knight <knight@baldmt.com>2005-10-10 02:49:11 (GMT)
commitfb3e4847942786fed2f7b10a1da35e1c0ef92513 (patch)
treee6bf38b4bb60546638faf52593a367b87099c8d9 /src/engine/SCons
parent04b10a2b9a5d1be08e3884c2f3ee641359b86989 (diff)
downloadSCons-fb3e4847942786fed2f7b10a1da35e1c0ef92513.zip
SCons-fb3e4847942786fed2f7b10a1da35e1c0ef92513.tar.gz
SCons-fb3e4847942786fed2f7b10a1da35e1c0ef92513.tar.bz2
Fix on-disk file matching on case-insensitive systems. Various fixes for win32 portability. Refactor the --debug=time test. Refactor the Perforce test. Additional cleanup.
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/Node/FS.py4
-rw-r--r--src/engine/SCons/Node/FSTests.py4
-rw-r--r--src/engine/SCons/Tool/msvs.py7
3 files changed, 12 insertions, 3 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index ceec696..810ede7 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -1432,10 +1432,10 @@ class Dir(Base):
except OSError:
pass
else:
- for entry in entries:
+ for entry in map(_my_normcase, entries):
d[entry] = 1
self.on_disk_entries = d
- return d.has_key(name)
+ return d.has_key(_my_normcase(name))
def srcdir_list(self):
"""__cacheable__"""
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 71fb3ef..565384f 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -1455,11 +1455,15 @@ class DirTestCase(_tempdirTestCase):
test.subdir('d')
test.write(['d', 'exists'], "d/exists\n")
+ test.write(['d', 'Case-Insensitive'], "d/Case-Insensitive\n")
d = self.fs.Dir('d')
assert d.entry_exists_on_disk('exists')
assert not d.entry_exists_on_disk('does_not_exist')
+ if os.path.normcase("TeSt") != os.path.normpath("TeSt") or sys.platform == "cygwin":
+ assert d.entry_exists_on_disk('case-insensitive')
+
def test_srcdir_list(self):
"""Test the Dir.srcdir_list() method
"""
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index 084f1d4..38c6dcb 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -1395,6 +1395,8 @@ solutionBuilder = SCons.Builder.Builder(action = '$MSVSSOLUTIONCOM',
suffix = '$MSVSSOLUTIONSUFFIX',
emitter = solutionEmitter)
+default_MSVS_SConscript = None
+
def generate(env):
"""Add Builders and construction variables for Microsoft Visual
Studio project files to an Environment."""
@@ -1416,7 +1418,10 @@ def generate(env):
# shouldn't depend on anything in SCons.Script.
env['MSVSSCONSCRIPT'] = SCons.Script.call_stack[0].sconscript
else:
- env['MSVSSCONSCRIPT'] = env.File('SConstruct')
+ global default_MSVS_SConscript
+ if default_MSVS_SConscript is None:
+ default_MSVS_SConscript = env.File('SConstruct')
+ env['MSVSSCONSCRIPT'] = default_MSVS_SConscript
env['MSVSSCONS'] = '"%s" -c "%s"' % (python_executable, exec_script_main)
env['MSVSSCONSFLAGS'] = '-C "${MSVSSCONSCRIPT.dir.abspath}" -f ${MSVSSCONSCRIPT.name}'