/[escript]/trunk/escript/src/SConscript
ViewVC logotype

Diff of /trunk/escript/src/SConscript

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

revision 699 by robwdcock, Mon Mar 27 02:43:09 2006 UTC revision 700 by gross, Thu Apr 6 00:13:40 2006 UTC
# Line 1  Line 1 
1    import os
2  Import('*')  Import('*')
3    
4  local_env=env.Copy()  local_env=env.Copy()
# Line 10  py_wrapper_name = lib_name+'cpp' Line 11  py_wrapper_name = lib_name+'cpp'
11  py_wrapper_source = py_wrapper_name+'.cpp'  py_wrapper_source = py_wrapper_name+'.cpp'
12  py_wrapper_lib_name = py_wrapper_name  py_wrapper_lib_name = py_wrapper_name
13    
14    # get the relevant file names:
15  src_dir = local_env.Dir('.').srcnode().abspath  src_dir = local_env.Dir('.').srcnode().abspath
16    filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
17    
 import os  
 filenames = os.listdir(src_dir)  
18  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
19  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
20    
21  # Filter out sources that should not be in the list automatically  # Filter out sources that should not be in the list automatically
22  sources.remove(py_wrapper_source) # FIXME: should probably refactor the source tree so the python wrapper isn't colocated with c++ sources  sources.remove(py_wrapper_source) # FIXME: should probably refactor the source tree so the python wrapper isn't colocated with c++ sources
23    
   
24  local_env.Append(LIBS = [boost_lib, 'esysUtils', sys_libs ])  local_env.Append(LIBS = [boost_lib, 'esysUtils', sys_libs ])
25  py_wrapper_local_env.Append(LIBS = [boost_lib, lib_name, 'esysUtils', sys_libs ])  py_wrapper_local_env.Append(LIBS = [boost_lib, lib_name, 'esysUtils', sys_libs ])
26    
# Line 38  py_wrapper_local_env.Install(pyinstall+' Line 39  py_wrapper_local_env.Install(pyinstall+'
39  dep_lib = [libinstall+'/'+str(x) for x in lib]  dep_lib = [libinstall+'/'+str(x) for x in lib]
40  Export('dep_lib')  Export('dep_lib')
41    
42    
43    
44    # add source files to release
45    release_srcfiles = [ env.File(x) for x in filenames ] + [env.File("SConscript"), ]
46    env.Zip(src_zipfile, release_srcfiles)
47    env.Tar(src_tarfile, release_srcfiles)
48    
49  # Call the python sconscript  # Call the python sconscript
50  env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)  env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
51    

Legend:
Removed from v.699  
changed lines
  Added in v.700

  ViewVC Help
Powered by ViewVC 1.1.26