Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-14 05:41:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-14 05:41:24 +0400
commit050f09aa6c80d24da0ccadafce73b82160a55894 (patch)
treeb61f230e5028fdba4aa94767d60e8db8a0e7235a /build_files/scons/tools/Blender.py
parentde5d0d649da9b73de96cbee9015b838e3c0389c1 (diff)
buildsystem cleanup: remove duplicate source & includes for scons,
add a check for duplicates in BlenderLib()m, if 0'd now.
Diffstat (limited to 'build_files/scons/tools/Blender.py')
-rw-r--r--build_files/scons/tools/Blender.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 7b8932bbb4c..a5e47a50d10 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -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()