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

Contents of /trunk/escript/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 340 - (show annotations)
Mon Dec 12 05:10:45 2005 UTC (13 years, 7 months ago) by jgs
File size: 3850 byte(s)
pass in pyinstall value from top-level scons script and add
correct suffix in module level scons scipr

1 # Scons configuration file for escript
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 libinstall = None
17 pyinstall = None
18 dodebug = 0
19 usegcc = 0
20 options = None
21
22 #
23 # import configuration variables passed in from
24 # calling SConscript (if any)
25
26 Import('*')
27
28 #
29 # retreive command-line arguments if any
30
31 if ARGUMENTS.get('libinstall',0):
32 libinstall = ARGUMENTS.get('libinstall',0)
33 Export(["libinstall"])
34
35 if ARGUMENTS.get('pyinstall',0):
36 pyinstall = ARGUMENTS.get('pyinstall',0)
37 pyinstall = Dir(str(pyinstall) + '/escript')
38 Export(["pyinstall"])
39
40 if ARGUMENTS.get('debug',0):
41 dodebug = 1
42
43 if ARGUMENTS.get('usegcc',0):
44 usegcc = 1
45
46 if ARGUMENTS.get('options',0):
47 options = ARGUMENTS.get('options',0)
48
49 #
50 # determine platform
51
52 env = Environment(ENV = os.environ)
53 platform = env['PLATFORM']
54
55 #
56 # determine hostname
57
58 import socket
59 hostname = socket.gethostname()
60
61 #
62 # export esysroot
63
64 Export(["esysroot"])
65
66 #
67 # set and export library directories
68
69 libdir = Dir(str(esysroot) + '/escript/lib')
70 Export(["libdir"])
71 libdir2 = Dir(str(esysroot) + '/lib')
72 Export(["libdir2"])
73
74 #
75 # set and export python directories
76
77 pydir = Dir(str(esysroot) + '/escript/lib/py_src')
78 Export(["pydir"])
79 pydir2 = Dir(str(esysroot) + '/esys/escript')
80 Export(["pydir2"])
81
82 #
83 # load and export configuration settings
84
85 options_dir = str(esysroot) + '/scons'
86 sys.path.append(options_dir)
87
88 from default_options import *
89
90 if hostname=='ess':
91 from ess_options import *
92
93 if usegcc==1:
94 from gcc_options import *
95
96 if options!=None:
97 exec "from " + options + " import *"
98
99 if dodebug==1:
100 cxx_flags=cxx_flags_debug
101
102 Export(["python_path"])
103 Export(["boost_path"])
104 Export(["cxx"])
105 Export(["cxx_flags"])
106 Export(["boost_lib_path"])
107 Export(["boost_lib"])
108 Export(["sys_libs"])
109
110 #
111 # print out build configuration for this module
112
113 print "Build configuration for module: escript"
114 print " dodebug: ", dodebug
115 print " usegcc: ", usegcc
116 print " cxx: ", cxx
117 print " platform: ", platform
118 print " hostname: ", hostname
119 print " libinstall: ", libinstall
120 print " pyinstall: ", pyinstall
121
122 #
123 # call the SConscript to do the actual build
124
125 SConscript(dirs=['src/Data'], build_dir='obj/Data', duplicate=0)
126 SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)
127 SConscript(dirs=['test/Data'], build_dir='obj/test/Data', duplicate=0)
128 SConscript(dirs=['test/DataAlgorithmAdapter'], build_dir='obj/test/DataAlgorithmAdapter', duplicate=0)
129 SConscript(dirs=['test/DataArray'], build_dir='obj/test/DataArray', duplicate=0)
130 SConscript(dirs=['test/DataArrayView'], build_dir='obj/test/DataArrayView', duplicate=0)
131 SConscript(dirs=['test/DataBlocks2D'], build_dir='obj/test/DataBlocks2D', duplicate=0)
132 SConscript(dirs=['test/DataC'], build_dir='obj/test/DataC', duplicate=0)
133 SConscript(dirs=['test/DataCached'], build_dir='obj/test/DataCached', duplicate=0)
134 SConscript(dirs=['test/DataConstant'], build_dir='obj/test/DataConstant', duplicate=0)
135 SConscript(dirs=['test/DataEmpty'], build_dir='obj/test/DataEmpty', duplicate=0)
136 SConscript(dirs=['test/DataExpanded'], build_dir='obj/test/DataExpanded', duplicate=0)
137 SConscript(dirs=['test/DataFactory'], build_dir='obj/test/DataFactory', duplicate=0)
138 SConscript(dirs=['test/DataProf'], build_dir='obj/test/DataProf', duplicate=0)
139 SConscript(dirs=['test/DataTagged'], build_dir='obj/test/DataTagged', duplicate=0)
140 SConscript(dirs=['test/DataVariable'], build_dir='obj/test/DataVariable', duplicate=0)
141 SConscript(dirs=['test/DataVector'], build_dir='obj/test/DataVector', duplicate=0)
142 SConscript(dirs=['test/FunctionSpace'], build_dir='obj/test/FunctionSpace', duplicate=0)
143 SConscript(dirs=['test/Taipan'], build_dir='obj/test/Taipan', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26