Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).
Differences between revisions 17 and 18
Revision 17 as of 2005-03-21 00:48:31
Size: 1053
Editor: 209-6-159-51
Comment:
Revision 18 as of 2008-03-12 02:47:00
Size: 1053
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Here's the current Sconstruct:

import SCons.Script
import os
def DoSrc(tgt, mode):
    build_dir = os.path.join('/projects', mode, tgt)
    SConscript('src/' + tgt + '/sconscript', build_dir= build_dir)

def DoFrozen(tgt, mode):
    build_dir = os.path.join('/projects', mode, tgt)
    SConscript('frozen/' + tgt + '/sconscript', build_dir= build_dir)

mode = 'release'
if ARGUMENTS.has_key('mode'):
   mode = ARGUMENTS['mode']
print '**** Compiling in ' + mode + ' mode...'

env = Environment()
Export('env')
env.PrependENVPath('PATH', 'E:/tools/mingw/bin')

DoSrc('pso', mode)
DoSrc('cppwiki', mode)
DoSrc('smanager', mode)
DoFrozen('jmirror', mode)

Note: the DoSrc and DoFrozen are identical except for the root directory. Should probably be refactored into one function

Here's a typical sconscript (they're all very similar):

import glob
Import('env')
project = 'cppwiki'

localenv = env.Copy()
localenv.Tool('msvc')
tgt = localenv.Program(project, glob.glob('*.cpp'))
env.Alias(project, tgt)

ExtendedExampleSource1 (last edited 2008-03-12 02:47:00 by localhost)