[Mesa-dev] [PATCH] scons: do not include headers when parsing the sources lists
Emil Velikov
emil.l.velikov at gmail.com
Wed Aug 13 05:38:55 PDT 2014
Modify oour custom function/method SourceListParser to avoid including
headers to the sources list. The SCons documentation is not explicit on
the topic yet building mesa with SCons and MSVC is known to have
problems when headers are listed. So be safe just drop them for now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82534
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
scons/source_list.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/scons/source_list.py b/scons/source_list.py
index e16d1f9..5a1bd96 100644
--- a/scons/source_list.py
+++ b/scons/source_list.py
@@ -85,6 +85,9 @@ class SourceListParser(object):
"""Parse a source list line."""
# more lines to come
if line and line[-1] == '\\':
+ # do not include any headers
+ if line[:-1].rstrip().endswith('.h'):
+ return 0;
# spaces around "\\\n" are replaced by a single space
if self.line_cont:
self.line_cont += line[:-1].strip() + ' '
@@ -94,7 +97,11 @@ class SourceListParser(object):
# combine with previous lines
if self.line_cont:
- line = self.line_cont + line.lstrip()
+ # do not include any headers
+ if line and line.rstrip().endswith('.h'):
+ line = self.line_cont
+ else:
+ line = self.line_cont + line.lstrip()
self.line_cont = ''
if line:
--
2.0.2
More information about the mesa-dev
mailing list