summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Marchelli <laurent.marchelli@gmail.com>2015-02-12 13:56:20 (GMT)
committerLaurent Marchelli <laurent.marchelli@gmail.com>2015-02-12 13:56:20 (GMT)
commit9eb723d919c456349b4bea07bb4e3b65a006251d (patch)
treeaa95909920af7718575470375b52fee2996f5a6a
parent93f09a34ae0fa1f368b86e041a8532e3023801a0 (diff)
downloadSCons-9eb723d919c456349b4bea07bb4e3b65a006251d.zip
SCons-9eb723d919c456349b4bea07bb4e3b65a006251d.tar.gz
SCons-9eb723d919c456349b4bea07bb4e3b65a006251d.tar.bz2
dumb error and output improvement.
-rw-r--r--src/engine/SCons/Tool/msvs.py21
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("&", "&amp;") # do this first
s = s.replace("'", "&apos;")
s = s.replace('"', "&quot;")
+ s = s.replace('\n', '&#x0A;')
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):