/[escript]/branches/RW_WIN32/SConstruct
ViewVC logotype

Diff of /branches/RW_WIN32/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 222 by robwdcock, Thu Nov 24 12:54:42 2005 UTC revision 229 by robwdcock, Fri Nov 25 06:17:13 2005 UTC
# Line 1  Line 1 
1    import scons_ext
2    
3  opts = Options('custom.py')  opts = Options('custom.py')
4  opts.AddOptions(  opts.AddOptions(
5     BoolOption('RELEASE', 'Set to build for release', 0),     BoolOption('RELEASE', 'Set to build for release', 0),
# Line 5  opts.AddOptions( Line 7  opts.AddOptions(
7     PathOption('BOOST_HOME','Path to boost home','/usr/include/boost')     PathOption('BOOST_HOME','Path to boost home','/usr/include/boost')
8  )  )
9    
10    env = Environment(tools = ['default'],options = opts)
11    
12  # Extensions to Scons  Help(opts.GenerateHelpText(env))
 def build_py(target, source, env):  
    # Code to build .pyc from .py  
    import py_compile, sys;  
    py_compile.compile(str(source[0]), str(target[0]))  
    return None  
 py_builder = Builder(action = build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)  
13    
14  env = Environment(tools = ['default'],options = opts)  py_builder = Builder(action = scons_ext.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)
15  env.Append(BUILDERS = {'PyCompile' : py_builder});  env.Append(BUILDERS = {'PyCompile' : py_builder});
16    
17    if env['PLATFORM'] == "win32":
18       runUnitTest_builder = Builder(action = scons_ext.runUnitTest, suffix = '.passed', src_suffix='.exe', single_source=True)
19    else:
20       runUnitTest_builder = Builder(action = scons_ext.runUnitTest, suffix = '.passed', single_source=True)
21    env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
22    
23    
24  print "PLATFORM is:", env['PLATFORM']  print "PLATFORM is:", env['PLATFORM']
25    
26  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
# Line 86  env.SConscript(dirs = ['tools/CppUnitTes Line 90  env.SConscript(dirs = ['tools/CppUnitTes
90  env.SConscript(dirs = ['finley/src/finleyC'], build_dir='build/$PLATFORM/finleyC', duplicate=0)  env.SConscript(dirs = ['finley/src/finleyC'], build_dir='build/$PLATFORM/finleyC', duplicate=0)
91  env.SConscript(dirs = ['finley/src/CPPAdapter'], build_dir='build/$PLATFORM/CPPAdapter', duplicate=0)  env.SConscript(dirs = ['finley/src/CPPAdapter'], build_dir='build/$PLATFORM/CPPAdapter', duplicate=0)
92    
93    if env['PLATFORM'] == "win32":
94       env.SConscript(dirs = ['win32/win32_utils'], build_dir='build/$PLATFORM/win32_utils', duplicate=0)
95    
96  # Unit Tests  # Unit Tests
97  env.SConscript(dirs = ['esysUtils/test/EsysException'], build_dir='build/$PLATFORM/esysUtils/test/EsysException', duplicate=0)  env.SConscript(dirs = ['esysUtils/test/EsysException'], build_dir='build/$PLATFORM/esysUtils/test/EsysException', duplicate=0)
98  env.SConscript(dirs = ['escript/test'], build_dir='build/$PLATFORM/escript/test', duplicate=0)  env.SConscript(dirs = ['escript/test'], build_dir='build/$PLATFORM/escript/test', duplicate=0)
99  env.SConscript(dirs = ['bruce/test'], build_dir='build/$PLATFORM/bruce/test', duplicate=0)  env.SConscript(dirs = ['bruce/test'], build_dir='build/$PLATFORM/bruce/test', duplicate=0)
100  env.SConscript(dirs = ['finley/test'], build_dir='build/$PLATFORM/finley/test', duplicate=0)  env.SConscript(dirs = ['finley/test'], build_dir='build/$PLATFORM/finley/test', duplicate=0)
101    
102  if env['PLATFORM'] == "win32":  # Python
103     env.SConscript(dirs = ['win32/win32_utils'], build_dir='build/$PLATFORM/win32_utils', duplicate=0)  env.SConscript(dirs = ['esys/py_src'], build_dir='build/$PLATFORM/esys/py', duplicate=0)
104    
105    

Legend:
Removed from v.222  
changed lines
  Added in v.229

  ViewVC Help
Powered by ViewVC 1.1.26