diff options
author | Laurent Marchelli <laurent.marchelli@gmail.com> | 2015-02-12 13:56:20 (GMT) |
---|---|---|
committer | Laurent Marchelli <laurent.marchelli@gmail.com> | 2015-02-12 13:56:20 (GMT) |
commit | 9eb723d919c456349b4bea07bb4e3b65a006251d (patch) | |
tree | aa95909920af7718575470375b52fee2996f5a6a | |
parent | 93f09a34ae0fa1f368b86e041a8532e3023801a0 (diff) | |
download | SCons-9eb723d919c456349b4bea07bb4e3b65a006251d.zip SCons-9eb723d919c456349b4bea07bb4e3b65a006251d.tar.gz SCons-9eb723d919c456349b4bea07bb4e3b65a006251d.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): |