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

Diff of /trunk/esysUtils/SConstruct

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

revision 191 by jgs, Mon Nov 21 04:10:12 2005 UTC revision 217 by jgs, Thu Nov 24 06:48:50 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # Scons configuration file for esysUtils
2    
3    import os
4    import sys
5    
6    #
7    # ensure correct versions of python and scons
8    
9    EnsurePythonVersion(2,3)
10    EnsureSConsVersion(0,96)
11    
12    #
13    # set appropriate defaults for configuration variables
14    
15    esysroot = Dir('#..')
16    dodebug = 0
17    usegcc = 0
18    
19    #
20    # import configuration variables passed in from
21    # calling SConscript (if any)
22    
23  Import('*')  Import('*')
24    
25  if esysroot == None:  #
26    esysroot = Dir('#..')  # retreive command-line arguments if any
27    
28    if ARGUMENTS.get('debug',0):
29      dodebug = 1
30    
31    if ARGUMENTS.get('usegcc',0):
32      usegcc = 1
33    
34    #
35    # determine platform
36    
37    env = Environment(ENV = os.environ)
38    platform = env['PLATFORM']
39    
40    #
41    # determine hostname
42    
43    hostname = os.environ['HOSTNAME']
44    
45    #
46    # export esysroot
47    
48  Export(["esysroot"])  Export(["esysroot"])
49    
50    #
51    # set and export library directory
52    
53  libdir = Dir(str(esysroot) + '/esysUtils/lib')  libdir = Dir(str(esysroot) + '/esysUtils/lib')
54  Export(["libdir"])  Export(["libdir"])
55    
56  python_path = '/raid2/tools/python-2.3.4/include/python2.3'  #
57  boost_path = '/raid2/tools/boost/include/boost-1_31'  # load and export configuration settings
58    
59    options_dir = str(esysroot) + '/scons'
60    sys.path.append(options_dir)
61    
62    if dodebug==0 and hostname=='ess':
63      from ess_options import *
64    
65  Export(["python_path"])  Export(["python_path"])
66  Export(["boost_path"])  Export(["boost_path"])
67    Export(["cxx_flags"])
68    
69  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  #
70    # print out build configuration for this module
71    
72  Export(["cxx_flags"])  print "############################################"
73    print "Build configuration for module: esysUtils"
74    print "         dodebug: ", dodebug
75    print "          usegcc: ", usegcc
76    print "        platform: ", platform
77    print "        hostname: ", hostname
78    print "############################################"
79    
80    #
81    # call the SConscript to do the actual build
82    
83  SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)  SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)

Legend:
Removed from v.191  
changed lines
  Added in v.217

  ViewVC Help
Powered by ViewVC 1.1.26