Clear scons installation directory when WITHOUT_BF_INSTALL is disabled.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 11 Feb 2010 22:02:27 +0000 (22:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 11 Feb 2010 22:02:27 +0000 (22:02 +0000)
After discussion with Brecht and Martin we agree this is best long term.

Also fixed "scons blenderlite" for python and fluid.

SConstruct
source/blender/makesrna/intern/SConscript

index 809b09a8ec6beb3741d096de4c966c8032ec3dd5..bbef7ba428801a83ccd90f3a90ab2350fa1be614 100644 (file)
@@ -188,8 +188,16 @@ opts.Update(env)
 if not env['BF_FANCY']:
        B.bc.disable()
 
+
+# remove install dir so old and new files are not mixed.
+if not env['WITHOUT_BF_INSTALL']:
+    if os.path.isdir(env['BF_INSTALLDIR']):
+        print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(env['BF_INSTALLDIR']))
+        shutil.rmtree(env['BF_INSTALLDIR'])
+
+
 SetOption('num_jobs', int(env['BF_NUMJOBS']))
-print "Build with %d parallel jobs" % (GetOption('num_jobs'))
+print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
 
 # BLENDERPATH is a unix only option to enable typical style paths this is
 # spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
@@ -200,12 +208,6 @@ if env['WITH_BF_FHS']:
 else:
        BLENDERPATH = env['BF_INSTALLDIR']
 
-# disable elbeem (fluidsim) compilation?
-if env['BF_NO_ELBEEM'] == 1:
-       env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
-       env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
-       env['CCFLAGS'].append('-DDISABLE_ELBEEM')
-
 if env['WITH_BF_OPENMP'] == 1:
                if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
                                env['CCFLAGS'].append('/openmp')
@@ -319,6 +321,12 @@ if 'blenderlite' in B.targets:
                if k not in B.arguments:
                        env[k] = v
 
+# disable elbeem (fluidsim) compilation?
+if env['BF_NO_ELBEEM'] == 1:
+       env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
+       env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
+       env['CCFLAGS'].append('-DDISABLE_ELBEEM')
+
 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
        env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
        env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
@@ -394,7 +402,7 @@ else:
        if toolset=='msvc':
                B.msvc_hack(env)
 
-print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
+print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
 env.SConsignFile(B.root_build_dir+'scons-signatures')
 B.init_lib_dict()
 
index 9491c4cf30e972dd7e4420762eb91c5e7fc1dfd3..b63a816edfbb14356cc6f3b08ee2ce40270843b6 100644 (file)
@@ -75,6 +75,8 @@ if env['WITH_BF_JACK']:
 if env['BF_UNIT_TEST']:
        defs.append('UNIT_TEST')
 
+if not env['WITH_BF_PYTHON']:
+       defs.append('DISABLE_PYTHON')
 
 if env['OURPLATFORM'] == 'linux2':
        cflags='-pthread'