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

Annotation of /trunk/esysUtils/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 309 - (hide annotations)
Mon Dec 5 01:59:58 2005 UTC (13 years, 5 months ago) by jgs
File size: 1795 byte(s)
now load default options - by default!

1 jgs 214 # Scons configuration file for esysUtils
2 jgs 190
3 jgs 214 import os
4 jgs 217 import sys
5 jgs 214
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 jgs 246 options = None
19 jgs 214
20     #
21     # import configuration variables passed in from
22     # calling SConscript (if any)
23    
24 jgs 190 Import('*')
25    
26 jgs 214 #
27     # retreive command-line arguments if any
28    
29     if ARGUMENTS.get('debug',0):
30     dodebug = 1
31    
32     if ARGUMENTS.get('usegcc',0):
33     usegcc = 1
34    
35 jgs 246 if ARGUMENTS.get('options',0):
36     options = ARGUMENTS.get('options',0)
37    
38 jgs 214 #
39     # determine platform
40    
41     env = Environment(ENV = os.environ)
42     platform = env['PLATFORM']
43    
44     #
45     # determine hostname
46    
47     hostname = os.environ['HOSTNAME']
48    
49     #
50     # export esysroot
51    
52 jgs 190 Export(["esysroot"])
53    
54 jgs 214 #
55     # set and export library directory
56    
57 jgs 190 libdir = Dir(str(esysroot) + '/esysUtils/lib')
58 jgs 180 Export(["libdir"])
59    
60 jgs 214 #
61     # load and export configuration settings
62    
63 jgs 216 options_dir = str(esysroot) + '/scons'
64     sys.path.append(options_dir)
65 jgs 191
66 jgs 309 from default_options import *
67    
68 jgs 224 if hostname=='ess':
69 jgs 216 from ess_options import *
70 jgs 214
71 jgs 241 if usegcc==1:
72     from gcc_options import *
73    
74 jgs 246 if options!=None:
75     exec "from " + options + " import *"
76    
77 jgs 224 if dodebug==1:
78     cxx_flags=cxx_flags_debug
79    
80 jgs 191 Export(["python_path"])
81     Export(["boost_path"])
82 jgs 223 Export(["cxx"])
83 jgs 214 Export(["cxx_flags"])
84 jgs 225 Export(["ar_flags"])
85 jgs 191
86 jgs 214 #
87     # print out build configuration for this module
88 jgs 191
89 jgs 214 print "Build configuration for module: esysUtils"
90     print " dodebug: ", dodebug
91     print " usegcc: ", usegcc
92 jgs 223 print " cxx: ", cxx
93 jgs 214 print " platform: ", platform
94     print " hostname: ", hostname
95 jgs 191
96 jgs 214 #
97     # call the SConscript to do the actual build
98    
99 jgs 309 SConscript(dirs=['src'], build_dir='obj/src', duplicate=0)
100     SConscript(dirs=['test/EsysException'], build_dir='obj/test/EsysException', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26