buildsystem cleanup: remove duplicate source & includes for scons,
authorCampbell Barton <ideasman42@gmail.com>
Wed, 14 Nov 2012 01:41:24 +0000 (01:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 14 Nov 2012 01:41:24 +0000 (01:41 +0000)
add a check for duplicates in BlenderLib()m, if 0'd now.

build_files/scons/tools/Blender.py
source/blender/editors/space_sequencer/SConscript
source/blender/gpu/SConscript
source/blender/imbuf/intern/dds/SConscript
source/gameengine/Converter/SConscript
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript

index 7b8932bbb4ca2bf8e7ffb1541015379fa94b1add..a5e47a50d108d3c1d51f8809f30fb043b129b85d 100644 (file)
@@ -790,6 +790,20 @@ class BlenderEnvironment(SConsEnvironment):
 
     def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None, cc_compilerchange=None, cxx_compilerchange=None):
         global vcp
+        
+        # sanity check
+        # run once in a while to check we dont have duplicates
+        if 0:
+            for name, dirs in (("source", sources), ("include", includes)):
+                files_clean = [os.path.normpath(f) for f in dirs]
+                files_clean_set = set(files_clean)
+                if len(files_clean) != len(files_clean_set):
+                    for f in sorted(files_clean_set):
+                        if f != '.' and files_clean.count(f) > 1:
+                            raise Exception("Found duplicate %s %r" % (name, f))
+            del name, dirs, files_clean, files_clean_set, f
+        # end sanity check
+
         if not self or not libname or not sources:
             print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
             self.Exit()
index 0b429ae750b673d3d5c8f042e4e5af0f0c1439bc..bc72786fc5fcff7d6a1bce9c2dd3aeddb517dd2f 100644 (file)
@@ -3,7 +3,7 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-incs = '../include ../../blenlib ../../blenkernel ../../blenfont ../../makesdna ../../imbuf'
+incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
 incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../makesrna ../../blenloader ../../blenfont'
 incs += ' #/intern/audaspace/intern'
index f7ed9effc7ac780a496f5952b5c0f768b3e93d37..9b8a86eac15d8a3c0a1282687194e6c42ae447e8 100644 (file)
@@ -27,7 +27,6 @@ sources.extend((
        os.path.join(env['DATA_SOURCES'], "gpu_shader_vertex.glsl.c"),
        os.path.join(env['DATA_SOURCES'], "gpu_shader_sep_gaussian_blur_frag.glsl.c"),
        os.path.join(env['DATA_SOURCES'], "gpu_shader_sep_gaussian_blur_vert.glsl.c"),
-       os.path.join(env['DATA_SOURCES'], "gpu_shader_material.glsl.c"),
        os.path.join(env['DATA_SOURCES'], "gpu_shader_vsm_store_frag.glsl.c"),
        os.path.join(env['DATA_SOURCES'], "gpu_shader_vsm_store_vert.glsl.c"),
        ))
index d5a613f5981b5302d980010abb43dd7424670850..475d21135aab2608f57858318eeae1a03e4eb2b0 100644 (file)
@@ -3,16 +3,17 @@ Import ('env')
 
 source_files = ['dds_api.cpp', 'DirectDrawSurface.cpp', 'Stream.cpp', 'BlockDXT.cpp', 'ColorBlock.cpp', 'Image.cpp', 'FlipDXT.cpp']
 
-incs = ['.',
-    '../../',
-    '../..',
+incs = [
+    '.',
     '..',
+    '../..',
     '../../../makesdna',
     '../../../blenkernel',
     '../../../blenlib',
     'intern/include',
     '#/intern/guardedalloc',
-    '#/intern/utfconv']
+    '#/intern/utfconv'
+    ]
 
 
 defs = ['WITH_DDS']
index bfd44dc90fc1c7d94c012f30a2f73c04763a0c1f..b9c7091028333128ff3ae4942711aa3b570cd12b 100644 (file)
@@ -11,7 +11,7 @@ incs += ' #source/gameengine/BlenderRoutines #source/blender/imbuf'
 incs += ' #intern/moto/include #source/gameengine/Ketsji #source/gameengine/Ketsji/KXNetwork'
 incs += ' #source/blender/blenlib #source/blender/blenkernel #source/blender'
 incs += ' #source/blender/editors/include #source/blender/makesdna #source/gameengine/Rasterizer'
-incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #source/gameengine/GameLogic'
+incs += ' #source/gameengine/GameLogic'
 incs += ' #source/gameengine/Expressions #source/gameengine/Network #source/gameengine/SceneGraph'
 incs += ' #source/gameengine/Physics/common #source/gameengine/Physics/Bullet'
 incs += ' #source/gameengine/Physics/Dummy'
index d5e1f081d21dc82c3e0f02bd4abd1728bca454db..6a1f47c51af5675092f9ff0ec20cff5866b598e1 100644 (file)
@@ -31,7 +31,6 @@ incs = ['.',
         '#source/blender',
         '#source/blender/include',
         '#source/blender/makesdna',
-        '#source/gameengine/BlenderRoutines',
         '#source/gameengine/Rasterizer',
         '#source/gameengine/GameLogic',
         '#source/gameengine/Expressions',
index 9fb0f053ed8f50ddbe3239790fc103f9449280bd..fb046d0fdf849693bccec9c95f48c82886ffae85 100644 (file)
@@ -26,7 +26,6 @@ incs = ['.',
         '#source/blender/include',
         '#source/blender/makesdna',
         '#source/blender/makesrna',
-        '#source/gameengine/BlenderRoutines',
         '#source/gameengine/Rasterizer',
         '#source/gameengine/GameLogic',
         '#source/gameengine/Expressions',
index 5f3af7360ff41f66aefba58c263c1d8d342052ad..63b28a9041215e1227c8c2c2b38aa4f3de1b65c1 100644 (file)
@@ -8,7 +8,7 @@ defs = [ 'GLEW_STATIC' ]
 incs = '. #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines '
 incs += ' #intern/container #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
 incs += ' #source/blender/gameengine/Ketsji #source/gameengine/SceneGraph #source/blender/makesdna #source/blender/blenkernel'
-incs += ' #intern/guardedalloc #source/blender/blenlib #source/gameengine/BlenderRoutines'
+incs += ' #intern/guardedalloc #source/blender/blenlib'
 
 if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')