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

Diff of /trunk/esysUtils/src/SConscript

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

revision 681 by jgs, Wed Jan 25 06:50:39 2006 UTC revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC
# Line 1  Line 1 
1  Import('*')  Import('*')
2    
3    local_env=env.Copy()
4    
5    src_dir = local_env.Dir('.').srcnode().abspath
6    
7  import os  import os
8  import string  filenames = os.listdir(src_dir)
9    sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10    headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11    # Filter out sources that should not be in the list automatically
12    
13    lib_name = 'esysUtils'
14    
15  esysUtils_path = str(esysroot) + '/esysUtils/src'  local_env.Append(LIBS = [boost_lib, ])
16    
17  cpp_path = [esysUtils_path,  lib = local_env.StaticLibrary(lib_name, sources)
             python_path,  
             boost_path]  
18    
19  lib = 'esysUtils'  include_path = Dir(lib_name, incinstall)
20    
21  sources = ['EsysException.cpp',  local_env.Install(include_path, headers )
22             'esysExceptionTranslator.cpp']  local_env.Install(libinstall, lib)
23    
24  utils_env = Environment(ENV = os.environ)  # Call the unit tests SConscript
25    # export the lib target since tests will depend on it
26    # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
27    # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
28    
29  utils_env.Replace(CXX = cxx)  dep_lib = [libinstall+'/'+str(x) for x in lib]
30  utils_env.Replace(CXXFLAGS = cxx_flags)  Export('dep_lib')
 utils_env.Replace(ARFLAGS = ar_flags)  
 utils_env.Replace(CPPPATH = cpp_path)  
31    
32  utils_lib = utils_env.StaticLibrary(lib, sources)  local_env.SConscript(dirs = ['#/esysUtils/test/EsysException'], build_dir='#/build/$PLATFORM/esysUtils/test/EsysException', duplicate=0)
33    
 Default(utils_env.Install(libdir, utils_lib))  

Legend:
Removed from v.681  
changed lines
  Added in v.682

  ViewVC Help
Powered by ViewVC 1.1.26