changeset 12455:d08accd58925

added support for wrapping long lines in mx/projects by placing a "\" at the end of the line (like the C preprocessor accepts)
author Doug Simon <doug.simon@oracle.com>
date Thu, 17 Oct 2013 01:05:13 +0200
parents ce4836e0212d
children f87c68d79f07
files mxtool/mx.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Wed Oct 16 18:27:28 2013 +0200
+++ b/mxtool/mx.py	Thu Oct 17 01:05:13 2013 +0200
@@ -526,8 +526,15 @@
             raise KeyError
 
         with open(projectsFile) as f:
+            prefix = ''
             for line in f:
                 line = line.strip()
+                if line.endswith('\\'):
+                    prefix = prefix + line[:-1]
+                    continue
+                if len(prefix) != 0:
+                    line = prefix + line
+                    prefix = ''
                 if len(line) != 0 and line[0] != '#':
                     key, value = line.split('=', 1)