Fix #28154: linux3-config.py doesn't exist
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 21 Aug 2011 13:31:46 +0000 (13:31 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 21 Aug 2011 13:31:46 +0000 (13:31 +0000)
Change OURPLATFORM from "linux<major_version>" to simple "linux".
Since new policy for linux kernel versions that major version in
platform doesn't make much sense for building rules so the same
rules could be used for both of linux2 and linux3 now/

Tested on both of linux2 and linux3 systems.

23 files changed:
SConstruct
build_files/scons/config/linux-config.py [moved from build_files/scons/config/linux2-config.py with 98% similarity]
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
doc/build_systems/scons-dev.txt
doc/build_systems/scons.txt
extern/bullet2/src/SConscript
intern/ghost/SConscript
source/blender/blenpluginapi/SConscript
source/blender/editors/armature/SConscript
source/blender/editors/mesh/SConscript
source/blender/editors/object/SConscript
source/blender/editors/physics/SConscript
source/blender/editors/render/SConscript
source/blender/editors/screen/SConscript
source/blender/editors/sculpt_paint/SConscript
source/blender/editors/space_file/SConscript
source/blender/editors/space_node/SConscript
source/blender/makesrna/SConscript
source/blender/makesrna/intern/SConscript
source/blender/nodes/SConscript
source/blender/render/SConscript
source/blender/windowmanager/SConscript

index 81c12c7c318091e2ee6ce19ae4bb84dcfb1d502c..e2b83f2811fa660eac9b6591dd207eaf35e71a23 100644 (file)
@@ -166,6 +166,13 @@ if sys.platform=='win32':
 
 env.SConscriptChdir(0)
 
+# Remove major kernel version from linux platform.
+# After Linus switched kernel to new version model this major version
+# shouldn't take much sense for building rules.
+
+if re.match('linux[0-9]+', platform):
+    platform = 'linux'
+
 crossbuild = B.arguments.get('BF_CROSS', None)
 if crossbuild and platform not in ('win32-vc', 'win64-vc'):
     platform = 'linuxcross'
@@ -551,7 +558,7 @@ if  env['OURPLATFORM']!='darwin':
                     scriptinstall.append(env.Install(dir=dir,source=source))
 
 #-- icons
-if env['OURPLATFORM']=='linux2':
+if env['OURPLATFORM']=='linux':
     iconlist = []
     icontargetlist = []
 
@@ -630,7 +637,7 @@ textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
 
 if  env['OURPLATFORM']=='darwin':
         allinstall = [blenderinstall, plugininstall, textinstall]
-elif env['OURPLATFORM']=='linux2':
+elif env['OURPLATFORM']=='linux':
         allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
 else:
         allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
similarity index 98%
rename from build_files/scons/config/linux2-config.py
rename to build_files/scons/config/linux-config.py
index d8e227cfb21531da3d98a34d6a2cc1f61cff8d19..c6613ec0ac1beba9374f01d75a7a8e9e944cc7dc 100644 (file)
@@ -1,4 +1,4 @@
-LCGDIR = '../lib/linux2'
+LCGDIR = '../lib/linux'
 LIBDIR = "${LCGDIR}"
 
 BF_PYTHON_ABI_FLAGS = 'm'  # Most common for linux distros
@@ -241,8 +241,8 @@ BF_PROFILE_LINKFLAGS = ['-pg']
 BF_DEBUG = False
 BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
 
-BF_BUILDDIR = '../build/linux2'
-BF_INSTALLDIR='../install/linux2'
+BF_BUILDDIR = '../build/linux'
+BF_INSTALLDIR='../install/linux'
 
 #Link against pthread
 PLATFORM_LINKFLAGS = ['-pthread']
index 6fae2785192a545092dd5befcb2a14065a0a116d..0b1f3fcd8a8521b3d5d139a03872ddbc88746671 100644 (file)
@@ -206,7 +206,7 @@ def setup_staticlibs(lenv):
         if lenv['WITH_BF_STATICJEMALLOC']:
             statlibs += Split(lenv['BF_JEMALLOC_LIB_STATIC'])
 
-    if lenv['OURPLATFORM']=='linux2':
+    if lenv['OURPLATFORM']=='linux':
         if lenv['WITH_BF_3DMOUSE']:
             libincs += Split(lenv['BF_3DMOUSE_LIBPATH'])
             if lenv['WITH_BF_STATIC3DMOUSE']:
@@ -277,7 +277,7 @@ def setup_syslibs(lenv):
         if not lenv['WITH_BF_STATICJEMALLOC']:
             syslibs += Split(lenv['BF_JEMALLOC_LIB'])
 
-    if lenv['OURPLATFORM']=='linux2':
+    if lenv['OURPLATFORM']=='linux':
         if lenv['WITH_BF_3DMOUSE']:
             if not lenv['WITH_BF_STATIC3DMOUSE']:
                 syslibs += Split(lenv['BF_3DMOUSE_LIB'])
@@ -775,7 +775,7 @@ class BlenderEnvironment(SConsEnvironment):
         if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'):
             if lenv['BF_DEBUG']:
                 lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb','/NODEFAULTLIB:libcmt'])
-        if  lenv['OURPLATFORM']=='linux2':
+        if  lenv['OURPLATFORM']=='linux':
             if lenv['WITH_BF_PYTHON']:
                 lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
         if  lenv['OURPLATFORM']=='sunos5':
index 25e0582c536f13089213fe92763045a367804df7..d222c0bcc18a11f4410eb93ca3426a593a848fc6 100644 (file)
@@ -568,7 +568,7 @@ def buildslave(target=None, source=None, env=None):
         extension = '.tar.bz2'
 
     platform = env['OURPLATFORM'].split('-')[0]
-    if platform == 'linux2':
+    if platform == 'linux':
         import platform
 
         bitness = platform.architecture()[0]
index d13ea7c036fed115d0632db360902c72d98a8cd1..ca1b392480433ed3dd3001c8a0214cd80175af10 100644 (file)
@@ -27,7 +27,7 @@ $Id$
     filenames have the form (platform)-config.py, where platform one of:
 
         * darwin
-        * linux2
+        * linux
         * win32-mingw
         * win32-vc
 
index b4d9a90588500a290577c4bd54d840ada422a31c..9d018bcc7905f0a3a81abefc44d973264a257c5b 100644 (file)
@@ -76,7 +76,7 @@ $Id$
     $BLENDERHOME/config. Your platform specific defaults are in
     (platform)-config.py, where platform is one of:
 
-        - linux2, for machines running Linux
+        - linux, for machines running Linux
         - win32-vc, for Windows machines, compiling with a Microsoft compiler
         - win32-mingw, for Windows machines, compiling with the MingW compiler
         - darwin, for OS X machines
index 5cb9185d6a1903b15fd13ba0a8e8129fe6bd8b5b..fa00ad7bc2eebb307f6d3a263213b60e7b0c95db 100644 (file)
@@ -11,10 +11,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     defs += ' WIN32 NDEBUG _WINDOWS'
     #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
     cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
-elif env['OURPLATFORM']=='win32-mingw':
+elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
     defs += ' NDEBUG'
     cflags += ['-O2']
-elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5':
+elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'):
     defs += ' NDEBUG'
     cflags += ['-O2']
 elif sys.platform=='darwin':
index 234fc0a172e1685fe1b27718b09664b31f5f874f..82f65c1c8ae45f58b4b85da80469979057d34434 100644 (file)
@@ -26,7 +26,7 @@ if env['WITH_GHOST_SDL']:
             pass
     incs += ' ' + env['BF_SDL_INC']
     defs += ['WITH_GHOST_SDL']
-elif window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
+elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
     for f in pf:
         try:
             sources.remove('intern' + os.sep + f + 'Win32.cpp')
@@ -81,7 +81,7 @@ else:
 if env['WITH_BF_3DMOUSE']:
     defs.append('WITH_INPUT_NDOF')
 
-    if env['OURPLATFORM']=='linux2':
+    if env['OURPLATFORM']=='linux':
         incs += ' ' + env['BF_3DMOUSE_INC']
 else:
     sources.remove('intern' + os.sep + 'GHOST_NDOFManager.cpp')
index 32e69069bb0dbe5fccc28461f864bd061e5604d7..7c7c1318a6ec42c2044769e30d74716a4b9de5c4 100644 (file)
@@ -11,7 +11,7 @@ if env['WITH_BF_QUICKTIME']:
     defs.append('WITH_QUICKTIME')
     incs += ' ' + env['BF_QUICKTIME_INC']
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index beabd912a2031aaaccc628889724e022ff5dbd96..b7f9a263bc11f9e0f7ec02521f94a2b02f87d162 100644 (file)
@@ -7,7 +7,7 @@ incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../
 incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../gpu ../../makesrna #/intern/opennl/extern'
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 34936c025bcb85c95d8bf103eb8d45748c46435f..b992ae5f04c7067b681d92a9dd92b7a636933ac2 100644 (file)
@@ -8,7 +8,7 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../gpu ../../blenloader'
 incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 660643fbb0fc2793b0f2ae783e4c462ebd798f79..ca048cb59f9f741290f4fe91eb93adbec0426e93 100644 (file)
@@ -10,7 +10,7 @@ incs += ' ../../render/extern/include ../../gpu' # for object_bake.c
 
 defs = []
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 274819c918cb078aa597a8c2ff03760ce3178fb8..188416eb04c28164e682f70e7d304e67629b4237 100644 (file)
@@ -10,7 +10,7 @@ incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 
 defs = ''
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 2b9737557cd0f6e8b1da465992d7a5fb6c8713a0..53418500ea64bf2dd6b5e3d6c1a05f080f349b26 100644 (file)
@@ -9,7 +9,7 @@ incs += ' ../../gpu'
 incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 incs += ' ../../blenloader'
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 61f3429521de49439ba1945677aa173920d0626c..1381c8202240152b82e1aa009828241651d3046c 100644 (file)
@@ -10,7 +10,7 @@ incs += ' #/intern/guardedalloc #/extern/glew/include'
 
 defs = ''
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 90b56ded2cdc1f41202878968dfab3e1a32682b2..b3927fcee6870570e8d8236b94652554a6443c42 100644 (file)
@@ -10,7 +10,7 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../render/extern/include'
 incs += ' ../../gpu ../../makesrna ../../blenloader'
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 7c55b40e8161b6bbdd3bda5731debda371b863ac..ad96840f7b9fc0449c46f9a64c5e8810c114dfc7 100644 (file)
@@ -19,7 +19,7 @@ if env['WITH_BF_OPENEXR']:
 if env['WITH_BF_TIFF']:
     defs.append('WITH_TIFF')
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 634d4b777d9390cf442c5582160ae555879bf2f8..c4309dcfca341922259d550006f25ec03bb8323f 100644 (file)
@@ -15,7 +15,7 @@ if env['CC'] == 'gcc':
     #cf.append('-Werror')
     pass
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index b706db5e64c87f0eeb2a522c95c9a9e11de971a2..1cb24630fbe709599387ce76402e59f98c30240d 100644 (file)
@@ -54,7 +54,7 @@ if env['WITH_BF_PYTHON']:
 if env['WITH_BF_COLLADA']:
     defs.append('WITH_COLLADA')
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index 5e43ed9b2fbcd039f70b0ad7535c11c30532f792..24c892b96c444a5608135dfd5a3599a3f157ed34 100644 (file)
@@ -91,7 +91,7 @@ if env['WITH_BF_PYTHON']:
 if env['WITH_BF_COLLADA']:
     defs.append('WITH_COLLADA')
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
@@ -140,7 +140,7 @@ targetpath = root_build_dir+'/makesrna'
 if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
     targetpath = '#' + targetpath
 
-if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep:
+if env['OURPLATFORM'] == 'linux' and root_build_dir[0]==os.sep:
     makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib'])
 else:
     makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib'])
index 4bed612144cb945f1074562bf530e5eeeaa75b2a..8d17c6f5e164aeafb12f57c79032f1b5c529c140 100644 (file)
@@ -26,7 +26,7 @@ if env['WITH_BF_PYTHON']:
     if env['BF_DEBUG']:
         defs.append('_DEBUG')
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
index bff7797e0c7780b9d7d6a26bd85c5ecd7a90dd76..4ec1ce3de6bc4d1f40b4725eccd3e4c9e87897bc 100644 (file)
@@ -31,7 +31,7 @@ if env['OURPLATFORM'] == 'darwin':
         cflags_raytrace = env['CFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
         cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
         
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     if env['WITH_BF_RAYOPTIMIZATION']:
         cflags_raytrace = env['CCFLAGS'] +  env['BF_RAYOPTIMIZATION_SSE_FLAGS']
         cxxflags_raytrace = env['CXXFLAGS'] +  env['BF_RAYOPTIMIZATION_SSE_FLAGS']
index 5b6e8b1ab3024139fbe1cc820dd0a133df4d0abe..e548d99e9a5493d7ab46bea66e5d6a08599b983b 100644 (file)
@@ -26,7 +26,7 @@ if env['WITH_BF_PYTHON']:
 if env['WITH_BF_COLLADA']:
     defs.append('WITH_COLLADA')
 
-if env['OURPLATFORM'] == 'linux2':
+if env['OURPLATFORM'] == 'linux':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'