[Bf-blender-cvs] [dfc672f] master: SCons: Fix for really nasty bug with polluting configuration environment

Sergey Sharybin noreply at git.blender.org
Tue Aug 4 18:10:29 CEST 2015


Commit: dfc672f8bbb8633f014f393fe3de2e39ed77c8dd
Author: Sergey Sharybin
Date:   Tue Aug 4 18:04:45 2015 +0200
Branches: master
https://developer.blender.org/rBdfc672f8bbb8633f014f393fe3de2e39ed77c8dd

SCons: Fix for really nasty bug with polluting configuration environment

The issue was caused by the following construction:

  def = env['SOMETHING']
  defs.append('SOMETHING_MORE')

Since first assignment was actually referencing environment option it was totally
polluted hawing weird and wonderful side effects on all other areas of Blender.

===================================================================

M	extern/glew-es/SConscript
M	extern/glew/SConscript
M	intern/ghost/SConscript
M	intern/glew-mx/SConscript
M	intern/opencolorio/SConscript
M	source/blender/blenfont/SConscript
M	source/blender/blenkernel/SConscript
M	source/blender/editors/animation/SConscript
M	source/blender/editors/armature/SConscript
M	source/blender/editors/gpencil/SConscript
M	source/blender/editors/interface/SConscript
M	source/blender/editors/mask/SConscript
M	source/blender/editors/mesh/SConscript
M	source/blender/editors/physics/SConscript
M	source/blender/editors/render/SConscript
M	source/blender/editors/screen/SConscript
M	source/blender/editors/sculpt_paint/SConscript
M	source/blender/editors/space_action/SConscript
M	source/blender/editors/space_buttons/SConscript
M	source/blender/editors/space_clip/SConscript
M	source/blender/editors/space_console/SConscript
M	source/blender/editors/space_file/SConscript
M	source/blender/editors/space_graph/SConscript
M	source/blender/editors/space_image/SConscript
M	source/blender/editors/space_info/SConscript
M	source/blender/editors/space_logic/SConscript
M	source/blender/editors/space_nla/SConscript
M	source/blender/editors/space_node/SConscript
M	source/blender/editors/space_outliner/SConscript
M	source/blender/editors/space_script/SConscript
M	source/blender/editors/space_sequencer/SConscript
M	source/blender/editors/space_text/SConscript
M	source/blender/editors/space_time/SConscript
M	source/blender/editors/space_view3d/SConscript
M	source/blender/editors/transform/SConscript
M	source/blender/editors/util/SConscript
M	source/blender/editors/uvedit/SConscript
M	source/blender/gpu/SConscript
M	source/blender/makesrna/SConscript
M	source/blender/makesrna/intern/SConscript
M	source/blender/nodes/SConscript
M	source/blender/python/SConscript
M	source/blender/windowmanager/SConscript
M	source/gameengine/BlenderRoutines/SConscript
M	source/gameengine/GamePlayer/common/SConscript
M	source/gameengine/GamePlayer/ghost/SConscript
M	source/gameengine/Ketsji/SConscript
M	source/gameengine/Physics/Bullet/SConscript
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
M	source/gameengine/Rasterizer/SConscript
M	source/gameengine/VideoTexture/SConscript

===================================================================

diff --git a/extern/glew-es/SConscript b/extern/glew-es/SConscript
index b7c713c..7552ce8 100644
--- a/extern/glew-es/SConscript
+++ b/extern/glew-es/SConscript
@@ -6,7 +6,9 @@ Import('env')
 
 sources = ['src/glew.c']
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
+
 if env['WITH_BF_GLEW_MX']:
     defs += ['GLEW_MX']
 incs = ['include']
diff --git a/extern/glew/SConscript b/extern/glew/SConscript
index d825968..a968738 100644
--- a/extern/glew/SConscript
+++ b/extern/glew/SConscript
@@ -6,7 +6,9 @@ Import('env')
 
 sources = ['src/glew.c']
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
+
 if env['WITH_BF_GLEW_MX']:
     defs += ['GLEW_MX']
 
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 025559e..7856621 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -48,7 +48,8 @@ sources.remove('intern' + os.sep + 'GHOST_ContextWGL.cpp')
 
 pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_SystemPaths', 'GHOST_Window', 'GHOST_DropTarget', 'GHOST_NDOFManager', 'GHOST_Context']
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_GL_EGL']:
     defs.append('WITH_EGL')
diff --git a/intern/glew-mx/SConscript b/intern/glew-mx/SConscript
index 5c70958..546470d 100644
--- a/intern/glew-mx/SConscript
+++ b/intern/glew-mx/SConscript
@@ -5,9 +5,8 @@ import os
 Import('env')
 
 sources = ['intern/glew-mx.c']
-
-defs = env['BF_GL_DEFINITIONS']
-
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 incs = [
     '.',
     env['BF_GLEW_INC'],
diff --git a/intern/opencolorio/SConscript b/intern/opencolorio/SConscript
index c2fb95a..6be6a5e 100644
--- a/intern/opencolorio/SConscript
+++ b/intern/opencolorio/SConscript
@@ -30,7 +30,9 @@ Import('env')
 sources = env.Glob('*.cc')
 
 incs = '. ../guardedalloc ../../source/blender/blenlib'
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_OCIO']:
     defs.append('WITH_OCIO')
diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript
index 61d2ca9..fdb5f66 100644
--- a/source/blender/blenfont/SConscript
+++ b/source/blender/blenfont/SConscript
@@ -48,7 +48,8 @@ incs = [
 
 incs.extend(Split(env['BF_FREETYPE_INC']))
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross':
     defs.append('_WIN32')
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 20ac329..853e2b0 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -72,7 +72,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_SMOKE']:
     defs.append('WITH_SMOKE')
diff --git a/source/blender/editors/animation/SConscript b/source/blender/editors/animation/SConscript
index ed4b794..11eea4d 100644
--- a/source/blender/editors/animation/SConscript
+++ b/source/blender/editors/animation/SConscript
@@ -43,7 +43,8 @@ incs = [
     '../../windowmanager',
     ]
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript
index 97bc1a1..8249dc0 100644
--- a/source/blender/editors/armature/SConscript
+++ b/source/blender/editors/armature/SConscript
@@ -45,7 +45,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript
index ab42bad..8e2ac5d 100644
--- a/source/blender/editors/gpencil/SConscript
+++ b/source/blender/editors/gpencil/SConscript
@@ -47,7 +47,8 @@ incs = [
     '../../windowmanager',
     ]
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript
index 5af8bba..7584fd8 100644
--- a/source/blender/editors/interface/SConscript
+++ b/source/blender/editors/interface/SConscript
@@ -46,7 +46,8 @@ incs = [
     '../../windowmanager',
     ]
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
     if env['WITH_BF_IME']:
diff --git a/source/blender/editors/mask/SConscript b/source/blender/editors/mask/SConscript
index bcbaaa3..c4e6daa 100644
--- a/source/blender/editors/mask/SConscript
+++ b/source/blender/editors/mask/SConscript
@@ -29,7 +29,8 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 incs = [
     '#/intern/guardedalloc',
diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript
index 122a750..8b41241 100644
--- a/source/blender/editors/mesh/SConscript
+++ b/source/blender/editors/mesh/SConscript
@@ -29,7 +29,8 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 incs = [
     '#/intern/guardedalloc',
diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript
index 983d1c4..98d6be6 100644
--- a/source/blender/editors/physics/SConscript
+++ b/source/blender/editors/physics/SConscript
@@ -46,7 +46,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/editors/render/SConscript b/source/blender/editors/render/SConscript
index cbb7988..ada0c6c 100644
--- a/source/blender/editors/render/SConscript
+++ b/source/blender/editors/render/SConscript
@@ -49,7 +49,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript
index f5442c7..355e306 100644
--- a/source/blender/editors/screen/SConscript
+++ b/source/blender/editors/screen/SConscript
@@ -46,7 +46,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript
index 233f562..ba20337 100644
--- a/source/blender/editors/sculpt_paint/SConscript
+++ b/source/blender/editors/sculpt_paint/SConscript
@@ -29,7 +29,8 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 incs = [
     '#/intern/guardedalloc',
diff --git a/source/blender/editors/space_action/SConscript b/source/blender/editors/space_action/SConscript
index 20f31dd..28572f6 100644
--- a/source/blender/editors/space_action/SConscript
+++ b/source/blender/editors/space_action/SConscript
@@ -29,7 +29,8 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 incs = [
     '#/intern/guardedalloc',
diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript
index 07fe17e..b9cba31 100644
--- a/source/blender/editors/space_buttons/SConscript
+++ b/source/blender/editors/space_buttons/SConscript
@@ -47,7 +47,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
diff --git a/source/blender/editors/space_clip/SConscript b/source/blender/editors/space_clip/SConscript
index 8fec4eb..46ad04a 100644
--- a/source/blender/editors/space_clip/SConscript
+++ b/source/blender/editors/space_clip/SConscript
@@ -29,7 +29,8 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 incs = [
     '#/intern/guardedalloc',
diff --git a/source/blender/editors/space_console/SConscript b/source/blender/editors/space_console/SConscript
index 87d12fe..f189cd3 100644
--- a/source/blender/editors/space_console/SConscript
+++ b/source/blender/editors/space_console/SConscript
@@ -29,7 +29,8 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 incs = [
     '../include',
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript
index 85c3e07..b37cba1 100644
--- a/source/blender/editors/space_file/SConscript
+++ b/source/blender/editors/space_file/SConscript
@@ -46,7 +46,8 @@ incs = [
     ]
 incs = ' '.join(incs)
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_OPENJPEG']:
     defs.append('WITH_OPENJPEG')
diff --git a/source/blender/editors/space_graph/SConscript b/source/blender/editors/space_graph/SConscript
index ac23e8e..216ce2d 100644
--- a/source/blender/editors/space_graph/SConscript
+++ b/source/blender/editors/space_graph/SConscript
@@ -44,7 +44,8 @@ incs = [
     '../../windowmanager',
     ]
 
-defs = env['BF_GL_DEFINITIONS']
+defs = []
+defs += env['BF_GL_DEFINITIONS']
 
 if env['WITH_BF_AUDASPACE']:
     defs += env['BF_AUDASPACE_DEF']
diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript
index e983db4..43181b4 100644


@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list