OSDN Git Service

scons: do not include headers from the sources lists
authorJose Fonseca <jfonseca@vmware.com>
Wed, 13 Aug 2014 19:33:35 +0000 (20:33 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 14 Aug 2014 14:38:04 +0000 (15:38 +0100)
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
Tested-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
scons/custom.py

index 09c937e..043793b 100644 (file)
@@ -276,6 +276,9 @@ def parse_source_list(env, filename, names=None):
                     # Prefer relative source paths, as absolute files tend to
                     # cause duplicate actions.
                     f = f[len(cur_srcdir + '/'):]
+                # do not include any headers
+                if f.endswith('.h'):
+                    continue
                 srcs.append(f)
 
         src_lists[sym] = srcs