scons: group state-trackers' and targets' scons
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 20 Jul 2014 22:40:14 +0000 (23:40 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 12 Aug 2014 23:46:54 +0000 (00:46 +0100)
Both share the identical dependencies, as such we can simplify
the scons script.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/SConscript

index cb617200752bbd258d1b1d9d45bb081e8ae18794..98d017e4db0484721be06a5b4b637b173f16786e 100644 (file)
@@ -21,35 +21,15 @@ SConscript([
     'drivers/trace/SConscript',
 ])
 
-#
-# State trackers
-#
-
-# Needed by some state trackers
-SConscript('winsys/sw/null/SConscript')
-
-if not env['embedded']:
-    SConscript('state_trackers/vega/SConscript')
-    if env['platform'] not in ('cygwin', 'darwin', 'haiku', 'sunos'):
-        SConscript('state_trackers/egl/SConscript')
-
-    if env['x11']:
-        SConscript('state_trackers/glx/xlib/SConscript')
-
-    if env['dri']:
-        SConscript('state_trackers/dri/SConscript')
-
-    if env['platform'] == 'windows':
-        SConscript('state_trackers/wgl/SConscript')
-
 #
 # Winsys
-# 
+#
 
 SConscript([
+    'winsys/sw/null/SConscript',
     'winsys/sw/wrapper/SConscript',
 ])
-    
+
 if env['x11']:
     SConscript([
         'winsys/sw/xlib/SConscript',
@@ -68,18 +48,13 @@ if env['platform'] == 'haiku':
 if env['dri']:
     SConscript([
         'winsys/sw/dri/SConscript',
-    ])
-
-    SConscript([
         'winsys/sw/kms-dri/SConscript',
-    ])
-
-    SConscript([
         'winsys/svga/drm/SConscript',
     ])
 
+
 #
-# Targets
+# State trackers and targets
 #
 
 SConscript([
@@ -87,19 +62,23 @@ SConscript([
 ])
 
 if not env['embedded']:
+    SConscript('state_trackers/vega/SConscript')
     if env['platform'] not in ('cygwin', 'darwin', 'freebsd', 'haiku', 'sunos'):
         SConscript([
-            'targets/egl-static/SConscript'
+            'state_trackers/egl/SConscript',
+            'targets/egl-static/SConscript',
         ])
 
     if env['x11']:
         SConscript([
+            'state_trackers/glx/xlib/SConscript',
             'targets/graw-xlib/SConscript',
             'targets/libgl-xlib/SConscript',
         ])
 
     if env['platform'] == 'windows':
         SConscript([
+            'state_trackers/wgl/SConscript',
             'targets/graw-gdi/SConscript',
             'targets/libgl-gdi/SConscript',
         ])
@@ -111,6 +90,7 @@ if not env['embedded']:
 
     if env['dri']:
         SConscript([
+            'state_trackers/dri/SConscript',
             'targets/dri/SConscript',
         ])