diff options
author | Steven Knight <knight@baldmt.com> | 2005-08-20 04:13:59 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-08-20 04:13:59 (GMT) |
commit | 363f4dd969747edcc783584138a8daf018417a47 (patch) | |
tree | 27a3ab63f74f7693bb5954d60dae2cb0a09cb937 /src/engine/SCons | |
parent | d8075b1a39a6d29bf2724e02a7b27dc35f794b70 (diff) | |
download | SCons-363f4dd969747edcc783584138a8daf018417a47.zip SCons-363f4dd969747edcc783584138a8daf018417a47.tar.gz SCons-363f4dd969747edcc783584138a8daf018417a47.tar.bz2 |
Have Visual Studio echo that we're using SCons to build things, to work around a quoting issue. (Shannon Mann)
Diffstat (limited to 'src/engine/SCons')
-rw-r--r-- | src/engine/SCons/Node/FS.py | 3 | ||||
-rw-r--r-- | src/engine/SCons/SConsign.py | 10 | ||||
-rw-r--r-- | src/engine/SCons/Tool/msvs.py | 9 |
3 files changed, 9 insertions, 13 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index d073d53..c7905b5 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -902,13 +902,14 @@ class FS(LocalFS): path_orig = [ path_first, ] + path_orig path_norm = [ _my_normcase(path_first), ] + path_norm else: + drive = _my_normcase(drive) # Absolute path try: directory = self.Root[drive] except KeyError: if not create: raise SCons.Errors.UserError - directory = RootDir(_my_normcase(drive), self) + directory = RootDir(drive, self) self.Root[drive] = directory if not path_orig: diff --git a/src/engine/SCons/SConsign.py b/src/engine/SCons/SConsign.py index 10bb98d..d99df4e 100644 --- a/src/engine/SCons/SConsign.py +++ b/src/engine/SCons/SConsign.py @@ -95,11 +95,7 @@ def Reset(): sig_files = [] DB_sync_list = [] -if os.sep == '/': - norm_entry = lambda s: s -else: - def norm_entry(str): - return string.replace(str, os.sep, '/') +normcase = os.path.normcase def write(): global sig_files @@ -163,7 +159,7 @@ class DB(Base): # Read using the path relative to the top of the Repository # (self.dir.tpath) from which we're fetching the signature # information. - path = norm_entry(dir.tpath) + path = normcase(dir.tpath) try: rawentries = db[path] except KeyError: @@ -202,7 +198,7 @@ class DB(Base): # directory (self.dir.path), not relative to the top of # the Repository; we only write to our own .sconsign file, # not to .sconsign files in Repositories. - path = norm_entry(self.dir.path) + path = normcase(self.dir.path) for key, entry in self.entries.items(): entry.convert_to_sconsign() db[path] = cPickle.dumps(self.entries, 1) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index 90b756c..7870695 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -256,9 +256,8 @@ class _GenerateV6DSP(_DSPGenerator): self.file.write('# PROP %sOutput_Dir "%s"\n' '# PROP %sIntermediate_Dir "%s"\n' % (base,outdir,base,outdir)) (d,c) = os.path.split(str(self.conspath)) - cmd = '"%s" -c "%s" -C %s -f %s %s' % (python_executable, - exec_script_main, - d, c, buildtarget) + cmd = 'echo Starting SCons && "%s" -c "%s" -C %s -f %s %s' + cmd = cmd % (python_executable, exec_script_main, d, c, buildtarget) self.file.write('# PROP %sCmd_Line "%s"\n' '# PROP %sRebuild_Opt "-c && %s"\n' '# PROP %sTarget_File "%s"\n' @@ -414,11 +413,11 @@ class _GenerateV7DSP(_DSPGenerator): buildtarget = self.configs[kind].buildtarget (d,c) = os.path.split(str(self.conspath)) - cmd = '"%s" -c "%s" -C %s -f %s %s' % (python_executable, + cmd = 'echo Starting SCons && "%s" -c "%s" -C %s -f %s %s' % (python_executable, exec_script_main_xml, d, c, buildtarget) - cleancmd = '"%s" -c "%s" -C %s -f %s -c %s' % (python_executable, + cleancmd = 'echo Starting SCons && "%s" -c "%s" -C %s -f %s -c %s' % (python_executable, exec_script_main_xml, d, c, buildtarget) |