diff -r 9287c3bfa3eb -r 5808d36c3722 sbsv2/raptor/python/raptor_data.py --- a/sbsv2/raptor/python/raptor_data.py Fri Dec 11 11:25:51 2009 +0000 +++ b/sbsv2/raptor/python/raptor_data.py Fri Dec 11 11:32:59 2009 +0000 @@ -722,15 +722,23 @@ def Apply(self, oldValue): try: value = os.environ[self.name] - - # if this value is a "path" or a "tool" then we need to make sure - # it is a proper absolute path in our preferred format. - if value and (self.type == "path" or self.type == "tool"): - try: - path = generic_path.Path(value) - value = str(path.Absolute()) - except ValueError,e: - raise BadToolValue("the environment variable %s is incorrect: %s" % (self.name, str(e))) + + if value: + # if this value is a "path" or a "tool" then we need to make sure + # it is a proper absolute path in our preferred format. + if self.type == "path" or self.type == "tool": + try: + path = generic_path.Path(value) + value = str(path.Absolute()) + except ValueError,e: + raise BadToolValue("the environment variable %s is incorrect: %s" % (self.name, str(e))) + # if this value ends in an un-escaped backslash, then it will be treated as a line continuation character + # in makefile parsing - un-escaped backslashes at the end of values are therefore escaped + elif value.endswith('\\'): + # an odd number of backslashes means there's one to escape + count = len(value) - len(value.rstrip('\\')) + if count % 2: + value += '\\' except KeyError: if self.default != None: value = self.default