diff options
author | LaurentMarchelli <devnull@localhost> | 2015-02-12 13:56:20 (GMT) |
---|---|---|
committer | LaurentMarchelli <devnull@localhost> | 2015-02-12 13:56:20 (GMT) |
commit | a2620590a2250a0662f8d89daeebf12adeb4e189 (patch) | |
tree | aa95909920af7718575470375b52fee2996f5a6a | |
parent | e8c3a25d13bd9424ae8d0ac927d9781e599998d6 (diff) | |
download | SCons-a2620590a2250a0662f8d89daeebf12adeb4e189.zip SCons-a2620590a2250a0662f8d89daeebf12adeb4e189.tar.gz SCons-a2620590a2250a0662f8d89daeebf12adeb4e189.tar.bz2 |
dumb error and output improvement.
-rw-r--r-- | src/engine/SCons/Tool/msvs.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index 071cb7b..d00413d 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -63,6 +63,7 @@ def xmlify(s): s = s.replace("&", "&") # do this first s = s.replace("'", "'") s = s.replace('"', """) + s = s.replace('\n', '
') return s # Process a CPPPATH list in includes, given the env, target and source. @@ -224,7 +225,7 @@ class _UserGenerator(object): dbg_settings = [] elif SCons.Util.is_Dict(env['DebugSettings']): dbg_settings = [env['DebugSettings']] - elif SCons.Util.is_List(env['dbg_settings']): + elif SCons.Util.is_List(env['DebugSettings']): if len(env['DebugSettings']) != len(variants): raise SCons.Errors.InternalError("Sizes of 'DebugSettings' and 'variant' lists must be the same.") dbg_settings = [] @@ -332,10 +333,11 @@ class _GenerateV7User(_UserGenerator): variant = self.configs[kind].variant platform = self.configs[kind].platform debug = self.configs[kind].debug - debug_settings = '\n'.join(['\t\t\t\t%s="%s"' % (key, xmlify(value)) - for key, value in debug.items() - if value is not None]) - self.usrfile.write(self.usrconf % locals()) + if debug: + debug_settings = '\n'.join(['\t\t\t\t%s="%s"' % (key, xmlify(value)) + for key, value in debug.items() + if value is not None]) + self.usrfile.write(self.usrconf % locals()) self.usrfile.write('\t</Configurations>\n</VisualStudioUserFile>') V10UserHeader = """\ @@ -393,10 +395,11 @@ class _GenerateV10User(_UserGenerator): variant = self.configs[kind].variant platform = self.configs[kind].platform debug = self.configs[kind].debug - debug_settings = '\n'.join(['\t\t<%s>%s</%s>' % (key, xmlify(value), key) - for key, value in debug.items() - if value is not None]) - self.usrfile.write(self.usrconf % locals()) + if debug: + debug_settings = '\n'.join(['\t\t<%s>%s</%s>' % (key, xmlify(value), key) + for key, value in debug.items() + if value is not None]) + self.usrfile.write(self.usrconf % locals()) self.usrfile.write('</Project>') class _DSPGenerator(object): |