/[escript]/trunk/escript/SConstruct
ViewVC logotype

Diff of /trunk/escript/SConstruct

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

revision 288 by jgs, Fri Dec 2 01:55:04 2005 UTC revision 474 by jgs, Mon Jan 30 04:23:44 2006 UTC
# Line 1  Line 1 
1  # Scons configuration file for escript  # Scons configuration file for escript
2    
 import os  
 import sys  
   
 #  
 # ensure correct versions of python and scons  
   
 EnsurePythonVersion(2,3)  
 EnsureSConsVersion(0,96)  
   
3  #  #
4  # set appropriate defaults for configuration variables  # set appropriate defaults for configuration variables
5    esysroot=str(Dir('./..').abspath)
6    execfile(str(File(esysroot+"/scons/esys_options.py")))
7    
8  esysroot = Dir('#..')  Export(["python_path"])
9  libinstall = None  Export(["boost_path"])
10  pyinstall = None  Export(["cxx"])
11  dodebug = 0  Export(["cxx_flags"])
12  usegcc = 0  Export(["boost_lib_path"])
13  options = None  Export(["boost_lib"])
14    Export(["python_lib_path"])
15  #  Export(["python_lib"])
16  # import configuration variables passed in from  Export(["sys_libs"])
 # calling SConscript (if any)  
   
 Import('*')  
   
 #  
 # retreive command-line arguments if any  
   
 if ARGUMENTS.get('libinstall',0):  
   libinstall = ARGUMENTS.get('libinstall',0)  
17  Export(["libinstall"])  Export(["libinstall"])
18    
 if ARGUMENTS.get('pyinstall',0):  
   pyinstall = ARGUMENTS.get('pyinstall',0)  
 Export(["pyinstall"])  
   
 if ARGUMENTS.get('debug',0):  
   dodebug = 1  
   
 if ARGUMENTS.get('usegcc',0):  
   usegcc = 1  
   
 if ARGUMENTS.get('options',0):  
   options = ARGUMENTS.get('options',0)  
   
19  #  #
20  # determine platform  # set and export library directories
   
 env = Environment(ENV = os.environ)  
 platform = env['PLATFORM']  
   
 #  
 # determine hostname  
   
 hostname = os.environ['HOSTNAME']  
   
 #  
 # export esysroot  
   
 Export(["esysroot"])  
   
 #  
 # set and export library directory  
21    
22  libdir = Dir(str(esysroot) + '/escript/lib')  libdir = Dir(str(esysroot) + '/escript/lib')
23  Export(["libdir"])  Export(["libdir"])
# Line 70  libdir2 = Dir(str(esysroot) + '/lib') Line 25  libdir2 = Dir(str(esysroot) + '/lib')
25  Export(["libdir2"])  Export(["libdir2"])
26    
27  #  #
28  # set and export python directory  # set and export python directories
29    
30  pydir = Dir(str(esysroot) + '/escript/lib/py_src')  pydir = Dir(str(esysroot) + '/escript/lib/py_src')
31  Export(["pydir"])  Export(["pydir"])
32  pydir2 = Dir(str(esysroot) + '/esys/escript')  pydir2 = Dir(str(esysroot) + '/esys/escript')
33  Export(["pydir2"])  Export(["pydir2"])
34    if pyinstall != None:
35  #    pyinstall = Dir(str(pyinstall) + '/escript')
36  # load and export configuration settings    Export(["pyinstall"])
   
 options_dir = str(esysroot) + '/scons'  
 sys.path.append(options_dir)  
   
 if hostname=='ess':  
   from ess_options import *  
   
 if usegcc==1:  
   from gcc_options import *  
   
 if options!=None:  
   exec "from " + options + " import *"  
   
 if dodebug==1:  
   cxx_flags=cxx_flags_debug  
   
 Export(["python_path"])  
 Export(["boost_path"])  
 Export(["cxx"])  
 Export(["cxx_flags"])  
 Export(["boost_lib_path"])  
 Export(["boost_lib"])  
 Export(["sys_libs"])  
37    
38  #  #
39  # print out build configuration for this module  # print out build configuration for this module
40    
 print "############################################"  
41  print "Build configuration for module: escript"  print "Build configuration for module: escript"
 print "         dodebug: ", dodebug  
 print "          usegcc: ", usegcc  
42  print "             cxx: ", cxx  print "             cxx: ", cxx
43  print "        platform: ", platform  print "       cxx_flags: ", cxx_flags
 print "        hostname: ", hostname  
 print "      libinstall: ", libinstall  
 print "       pyinstall: ", pyinstall  
 print "############################################"  
44    
45  #  #
46  # call the SConscript to do the actual build  # call the SConscripts to do the actual build
47    
48  SConscript(dirs=['src/Data'], build_dir='obj/Data', duplicate=0)  SConscript(dirs=['src'], build_dir='obj', duplicate=0)
49  SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)  SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)
50  SConscript(dirs=['test/Data'], build_dir='obj/test/Data', duplicate=0)  SConscript(dirs=['test/Data'], build_dir='obj/test/Data', duplicate=0)
51  SConscript(dirs=['test/DataAlgorithmAdapter'], build_dir='obj/test/DataAlgorithmAdapter', duplicate=0)  SConscript(dirs=['test/DataAlgorithmAdapter'], build_dir='obj/test/DataAlgorithmAdapter', duplicate=0)

Legend:
Removed from v.288  
changed lines
  Added in v.474

  ViewVC Help
Powered by ViewVC 1.1.26