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

Annotation of /trunk/finley/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 277 - (hide annotations)
Wed Nov 30 04:52:39 2005 UTC (13 years, 9 months ago) by jgs
File size: 2489 byte(s)
explicitly define dependencies between modules

1 jgs 214 # Scons configuration file for finley
2    
3     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 jgs 192 libinstall = None
17 jgs 268 pyinstall = None
18 jgs 214 dodebug = 0
19     usegcc = 0
20 jgs 246 options = None
21 jgs 190
22 jgs 214 #
23     # import configuration variables passed in from
24     # calling SConscript (if any)
25    
26 jgs 190 Import('*')
27    
28 jgs 214 #
29     # retreive command-line arguments if any
30 jgs 190
31 jgs 214 if ARGUMENTS.get('libinstall',0):
32     libinstall = ARGUMENTS.get('libinstall',0)
33 jgs 192 Export(["libinstall"])
34    
35 jgs 268 if ARGUMENTS.get('pyinstall',0):
36     pyinstall = ARGUMENTS.get('pyinstall',0)
37     else:
38     pyinstall = Dir(str(esysroot) + '/esys/finley')
39     Export(["pyinstall"])
40    
41 jgs 214 if ARGUMENTS.get('debug',0):
42     dodebug = 1
43    
44     if ARGUMENTS.get('usegcc',0):
45     usegcc = 1
46    
47 jgs 246 if ARGUMENTS.get('options',0):
48     options = ARGUMENTS.get('options',0)
49    
50 jgs 214 #
51     # determine platform
52    
53     env = Environment(ENV = os.environ)
54     platform = env['PLATFORM']
55    
56     #
57     # determine hostname
58    
59     hostname = os.environ['HOSTNAME']
60    
61     #
62     # export esysroot
63    
64     Export(["esysroot"])
65    
66     #
67     # set and export library directory
68    
69 jgs 190 libdir = Dir(str(esysroot) + '/finley/lib')
70 jgs 182 Export(["libdir"])
71    
72 jgs 214 #
73 jgs 268 # set and export python directory
74    
75     pydir = Dir(str(esysroot) + '/finley/lib/py_src')
76     Export(["pydir"])
77    
78     #
79 jgs 214 # load and export configuration settings
80    
81 jgs 216 options_dir = str(esysroot) + '/scons'
82     sys.path.append(options_dir)
83 jgs 191
84 jgs 224 if hostname=='ess':
85 jgs 216 from ess_options import *
86 jgs 191
87 jgs 241 if usegcc==1:
88     from gcc_options import *
89    
90 jgs 246 if options!=None:
91     exec "from " + options + " import *"
92    
93 jgs 224 if dodebug==1:
94     cxx_flags=cxx_flags_debug
95     cc_flags=cc_flags_debug
96    
97 jgs 214 Export(["python_path"])
98     Export(["boost_path"])
99 jgs 223 Export(["cxx"])
100     Export(["cc"])
101 jgs 191 Export(["cxx_flags"])
102     Export(["cc_flags"])
103 jgs 277 Export(["boost_lib_path"])
104     Export(["boost_lib"])
105     Export(["sys_libs"])
106     Export(["solver_libs"])
107 jgs 191
108 jgs 214 #
109     # print out build configuration for this module
110    
111     print "############################################"
112     print "Build configuration for module: finley"
113     print " dodebug: ", dodebug
114     print " usegcc: ", usegcc
115 jgs 223 print " cc: ", cc
116     print " cxx: ", cxx
117 jgs 214 print " platform: ", platform
118     print " hostname: ", hostname
119     print " libinstall: ", libinstall
120 jgs 268 print " pyinstall: ", pyinstall
121 jgs 214 print "############################################"
122    
123     #
124     # call the SConscript to do the actual build
125    
126 jgs 268 SConscript(dirs=['src/finley'], build_dir='obj/finley', duplicate=0)
127     SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26