From a6b1c0a8ccb54aa75cc5b1d340fa567ccf4af3e7 Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Sun, 19 Oct 2008 21:25:17 +0000 Subject: Added WITH_BF_NOBLENDER to scons so that blenderplayer can be compiler by itself (false by default). Also added dependency for 'blender' on command line; seems 'blender' was intended to be a target, but would give the error "Do not know how to make target `blender' ". --- SConstruct | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 0a959cc5b7b..e7d4a4e77bd 100644 --- a/SConstruct +++ b/SConstruct @@ -363,7 +363,8 @@ dobj = B.buildinfo(env, "dynamic") + B.resources thestatlibs, thelibincs = B.setup_staticlibs(env) thesyslibs = B.setup_syslibs(env) -env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') +if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']: + env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') if env['WITH_BF_PLAYER']: playerlist = B.create_blender_liblist(env, 'player') env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') @@ -534,6 +535,10 @@ nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print) nsiscmd = env.Command('nsisinstaller', None, nsisaction) nsisalias = env.Alias('nsis', nsiscmd) +if 'blender' in B.targets: + blenderexe= env.Alias('blender', B.program_list) + Depends(blenderexe,installtarget) + if env['WITH_BF_PLAYER']: blenderplayer = env.Alias('blenderplayer', B.program_list) Depends(blenderplayer,installtarget) -- cgit v1.2.3 From f1f27c0350bbff1aa7f444f75eab294dd6b78e16 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 19 Oct 2008 22:01:46 +0000 Subject: === SCons === [#17867] Adds option to SCONS to generate Python API documentation Added patch from Brandano with some small improvements (BF_DOCDIR, clean) by yours truly. To use make sure you have epydoc installed. Enable with WITH_BF_BPYDOC=1. --- SConstruct | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index e7d4a4e77bd..f15aa8bfa22 100644 --- a/SConstruct +++ b/SConstruct @@ -277,15 +277,15 @@ if 'blenderlite' in B.targets: env['WITH_BF_BINRELOC'] = False env['BF_BUILDINFO'] = False env['BF_NO_ELBEEM'] = True - - # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep) B.root_build_dir = env['BF_BUILDDIR'] -env['BUILDDIR'] = B.root_build_dir +B.doc_build_dir = env['BF_DOCDIR'] if not B.root_build_dir[-1]==os.sep: B.root_build_dir += os.sep +if not B.doc_build_dir[-1]==os.sep: + B.doc_build_dir += os.sep # We do a shortcut for clean when no quicklist is given: just delete # builddir without reading in SConscripts @@ -294,8 +294,18 @@ if 'clean' in B.targets: do_clean = True if not quickie and do_clean: + if os.path.exists(B.doc_build_dir): + print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC + dirs = os.listdir(B.doc_build_dir) + for entry in dirs: + if os.path.isdir(B.doc_build_dir + entry) == 1: + print "clean dir %s"%(B.doc_build_dir+entry) + shutil.rmtree(B.doc_build_dir+entry) + else: # remove file + print "remove file %s"%(B.doc_build_dir+entry) + os.remove(B.root_build_dir+entry) if os.path.exists(B.root_build_dir): - print B.bc.HEADER+'Cleaning...'+B.bc.ENDC + print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC dirs = os.listdir(B.root_build_dir) for entry in dirs: if os.path.isdir(B.root_build_dir + entry) == 1: @@ -321,6 +331,8 @@ if not os.path.isdir ( B.root_build_dir): os.makedirs ( B.root_build_dir + 'extern' ) os.makedirs ( B.root_build_dir + 'lib' ) os.makedirs ( B.root_build_dir + 'bin' ) +if not os.path.isdir(B.doc_build_dir): + os.makedirs ( B.doc_build_dir ) Help(opts.GenerateHelpText(env)) @@ -565,5 +577,6 @@ if not env['WITHOUT_BF_INSTALL']: # TODO: build stubs and link into blenderplayer #------------ EPYDOC -# TODO: run epydoc +if env['WITH_BF_BPYDOC']: + SConscript(['source/blender/python/api2_2x/doc/SConscript']) -- cgit v1.2.3 From bc55102eac2ac0dfba8f32530ac674213aedc477 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Oct 2008 23:21:01 +0000 Subject: renamed WITH_BF_BPYDOC to WITH_BF_DOCS, added SConscript for building BGE docs too. --- SConstruct | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index f15aa8bfa22..48115a39b1d 100644 --- a/SConstruct +++ b/SConstruct @@ -577,6 +577,7 @@ if not env['WITHOUT_BF_INSTALL']: # TODO: build stubs and link into blenderplayer #------------ EPYDOC -if env['WITH_BF_BPYDOC']: - SConscript(['source/blender/python/api2_2x/doc/SConscript']) +if env['WITH_BF_DOCS']: + SConscript('source/blender/python/api2_2x/doc/SConscript') + SConscript('source/gameengine/PyDoc/SConscript') -- cgit v1.2.3 From ac4ff83ca6b5795f4451a7e743d3975aeb17ae3b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Oct 2008 18:47:13 +0000 Subject: added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON) --- SConstruct | 1 + 1 file changed, 1 insertion(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 48115a39b1d..25cb6800b1d 100644 --- a/SConstruct +++ b/SConstruct @@ -277,6 +277,7 @@ if 'blenderlite' in B.targets: env['WITH_BF_BINRELOC'] = False env['BF_BUILDINFO'] = False env['BF_NO_ELBEEM'] = True + env['WITH_BF_PYTHON'] = False # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep) -- cgit v1.2.3 From 0bd7934be731aba65680c7fe59f2d89a06391899 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Thu, 30 Oct 2008 23:55:07 +0000 Subject: * Minimum SCons version is now 1.0.0 - Code has been changed to reflect this (ie. deprecated functions are not anymore used) * clean up the C and C++ compiler flags mess. - in the environment construction of BlenderLib all the compile flag governing options have been split in the *C*, *CC* and *CXX* containing equivalents. C is for C compiler only flags. CC is for C and C++ compiler flags and CXX is for C++ compiler only flags. All the platform default config files need to be double checked and fixed wherever it looks necessary. Either DIY, or send me a note with needed changes. - a start for the BlenderLib parameter list has been made - all the SConscripts need to be checked and modified to hand in flags properly. * A theeth request: make -jN settable in the config file. - I give you BF_NUMJOBS, which is set to 1 by default. In your user-config.py, set BF_NUMJOBS=4 to have 4 parallel jobs handled. Yay. --- SConstruct | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 25cb6800b1d..91603ce7724 100644 --- a/SConstruct +++ b/SConstruct @@ -42,6 +42,8 @@ import tools.Blender import tools.btools import tools.bcolors +EnsureSConsVersion(1,0,0) + BlenderEnvironment = tools.Blender.BlenderEnvironment btools = tools.btools B = tools.Blender @@ -172,6 +174,9 @@ opts.Update(env) if not env['BF_FANCY']: B.bc.disable() +SetOption('num_jobs', int(env['BF_NUMJOBS'])) +print "Build with %d parallel jobs" % (GetOption('num_jobs')) + # disable elbeem (fluidsim) compilation? if env['BF_NO_ELBEEM'] == 1: env['CPPFLAGS'].append('-DDISABLE_ELBEEM') -- cgit v1.2.3