1 |
# Copyright 2006 by ACcESS MNRF |
2 |
# |
3 |
# http://www.access.edu.au |
4 |
# Primary Business: Queensland, Australia |
5 |
# Licensed under the Open Software License version 3.0 |
6 |
# http://www.opensource.org/licenses/osl-3.0.php |
7 |
# |
8 |
# |
9 |
# |
10 |
|
11 |
# top-level Scons configuration file for all esys13 modules |
12 |
# Begin initialisation Section |
13 |
# all of this section just intialises default environments and helper |
14 |
# scripts. You shouldn't need to modify this section. |
15 |
EnsureSConsVersion(0,96,91) |
16 |
EnsurePythonVersion(2,3) |
17 |
|
18 |
# import tools: |
19 |
import glob |
20 |
import sys, os |
21 |
import socket |
22 |
# Add our extensions |
23 |
if sys.path.count('scons')==0: sys.path.append('scons') |
24 |
import scons_extensions |
25 |
|
26 |
# check if UMFPACK is installed on the system: |
27 |
if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'): |
28 |
umf_path_default='/opt/UMFPACK/Include' |
29 |
umf_lib_path_default='/opt/UMFPACK/Lib' |
30 |
umf_libs_default=['umfpack'] |
31 |
else: |
32 |
umf_path_default=None |
33 |
umf_lib_path_default=None |
34 |
umf_libs_default=None |
35 |
|
36 |
if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'): |
37 |
amd_path_default='/opt/AMD/Include' |
38 |
amd_lib_path_default='/opt/AMD/Lib' |
39 |
amd_libs_default=['amd'] |
40 |
else: |
41 |
amd_path_default=None |
42 |
amd_lib_path_default=None |
43 |
amd_libs_default=None |
44 |
|
45 |
if os.path.isdir('/opt/UFconfig'): |
46 |
ufc_path_default='/opt/UFconfig' |
47 |
else: |
48 |
ufc_path_default=None |
49 |
|
50 |
# Default options and options help text |
51 |
# These are defaults and can be overridden using command line arguments or an options file. |
52 |
# if the options_file or ARGUMENTS do not exist then the ones listed as default here are used |
53 |
# DO NOT CHANGE THEM HERE |
54 |
if ARGUMENTS.get('options_file',0): |
55 |
options_file = ARGUMENTS.get('options_file',0) |
56 |
else: |
57 |
from string import ascii_letters,digits |
58 |
hostname="" |
59 |
for s in socket.gethostname().split('.')[0]: |
60 |
if s in ascii_letters+digits: |
61 |
hostname+=s |
62 |
else: |
63 |
hostname+="_" |
64 |
options_file = "scons/"+hostname+"_options.py" |
65 |
print "option file is ",options_file |
66 |
|
67 |
opts = Options(options_file, ARGUMENTS) |
68 |
opts.AddOptions( |
69 |
# Where to install esys stuff |
70 |
('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'), |
71 |
('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'), |
72 |
('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath), |
73 |
('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"), |
74 |
('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"), |
75 |
('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"), |
76 |
('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"), |
77 |
('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"), |
78 |
('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"), |
79 |
('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"), |
80 |
('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"), |
81 |
('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"), |
82 |
# Compilation options |
83 |
BoolOption('dodebug', 'Do you want a debug build?', 'no'), |
84 |
('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file), |
85 |
('cc_defines','C/C++ defines to use', None), |
86 |
('cc_flags','C compiler flags to use (Release build)', '-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas'), |
87 |
('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'), |
88 |
('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'), |
89 |
('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'), |
90 |
('cc_flags_MPI','C compiler flags to use (Release MPI build)', '-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias -fno-alias -c99 -w1 -fpic -wd161'), |
91 |
('cc_flags_debug_MPI', 'C compiler flags to use (Debug MPI build)', '-g -O0 -c99 -w1 -fpic -wd161'), |
92 |
('cxx_flags_MPI', 'C++ compiler flags to use (Release MPI build)', '-ansi -wd1563 -wd161'), |
93 |
('cxx_flags_debug_MPI', 'C++ compiler flags to use (Debug MPI build)', '-ansi -DDOASSERT -DDOPROF -wd1563 -wd161'), |
94 |
('ar_flags', 'Static library archiver flags to use', None), |
95 |
('sys_libs', 'System libraries to link with', None), |
96 |
('tar_flags','flags for zip files','-c -z'), |
97 |
# MKL |
98 |
PathOption('mkl_path', 'Path to MKL includes', None), |
99 |
PathOption('mkl_lib_path', 'Path to MKL libs', None), |
100 |
('mkl_libs', 'MKL libraries to link with', None), |
101 |
# SCSL |
102 |
PathOption('scsl_path', 'Path to SCSL includes', None), |
103 |
PathOption('scsl_lib_path', 'Path to SCSL libs', None), |
104 |
('scsl_libs', 'SCSL libraries to link with', None), |
105 |
('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None), |
106 |
# UMFPACK |
107 |
PathOption('ufc_path', 'Path to UFconfig includes', ufc_path_default), |
108 |
PathOption('umf_path', 'Path to UMFPACK includes', umf_path_default), |
109 |
PathOption('umf_lib_path', 'Path to UMFPACK libs', umf_lib_path_default), |
110 |
('umf_libs', 'UMFPACK libraries to link with', umf_libs_default), |
111 |
# AMD (used by UMFPACK) |
112 |
PathOption('amd_path', 'Path to AMD includes', amd_path_default), |
113 |
PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default), |
114 |
('amd_libs', 'AMD libraries to link with', amd_libs_default), |
115 |
# BLAS |
116 |
PathOption('blas_path', 'Path to BLAS includes', None), |
117 |
PathOption('blas_lib_path', 'Path to BLAS libs', None), |
118 |
('blas_libs', 'BLAS libraries to link with', None), |
119 |
# netCDF |
120 |
('useNetCDF', 'switch on/off the usage of netCDF', 'yes'), |
121 |
PathOption('netCDF_path', 'Path to netCDF includes', '/usr/local/include'), |
122 |
PathOption('netCDF_lib_path', 'Path to netCDF libs', '/usr/local/lib'), |
123 |
('netCDF_libs_cxx', 'netCDF C++ libraries to link with', [ 'netcdf_c++', 'netcdf'] ), |
124 |
# Python |
125 |
# locations of include files for python |
126 |
PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])), |
127 |
PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'), |
128 |
('python_lib', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]), |
129 |
# Boost |
130 |
PathOption('boost_path', 'Path to Boost includes', '/usr/include'), |
131 |
PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'), |
132 |
('boost_lib', 'Boost libraries to link with', ['boost_python',]), |
133 |
# Doc building |
134 |
# PathOption('doxygen_path', 'Path to Doxygen executable', None), |
135 |
# PathOption('epydoc_path', 'Path to Epydoc executable', None), |
136 |
# PAPI |
137 |
PathOption('papi_path', 'Path to PAPI includes', None), |
138 |
PathOption('papi_lib_path', 'Path to PAPI libs', None), |
139 |
('papi_libs', 'PAPI libraries to link with', None), |
140 |
# MPI |
141 |
BoolOption('useMPI', 'Compile parallel version using MPI', 'no'), |
142 |
) |
143 |
|
144 |
# Initialise Scons Build Environment |
145 |
# check for user environment variables we are interested in |
146 |
try: |
147 |
python_path = os.environ['PYTHONPATH'] |
148 |
except KeyError: |
149 |
python_path = '' |
150 |
try: |
151 |
path = os.environ['PATH'] |
152 |
except KeyError: |
153 |
path = '' |
154 |
try: |
155 |
ld_library_path = os.environ['LD_LIBRARY_PATH'] |
156 |
except KeyError: |
157 |
ld_library_path = '' |
158 |
|
159 |
# Note: On the Altix the intel compilers are not automatically |
160 |
# detected by scons intelc.py script. The Altix has a different directory |
161 |
# path and in some locations the "modules" facility is used to support |
162 |
# multiple compiler versions. This forces the need to import the users PATH |
163 |
# environment which isn't the "scons way" |
164 |
# This doesn't impact linux and windows which will use the default compiler (g++ or msvc, or the intel compiler if it is installed on both platforms) |
165 |
# FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix |
166 |
|
167 |
if os.name != "nt" and os.uname()[4]=='ia64': |
168 |
env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts) |
169 |
env['ENV']['PATH'] = path |
170 |
env['ENV']['LD_LIBRARY_PATH'] = ld_library_path |
171 |
env['ENV']['PYTHONPATH'] = python_path |
172 |
if env['CXX'] == 'icpc': |
173 |
env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py |
174 |
elif os.name == "nt": |
175 |
env = Environment(tools = ['default', 'intelc'], options = opts) |
176 |
env['ENV']['PYTHONPATH'] = python_path |
177 |
else: |
178 |
env = Environment(tools = ['default'], options = opts) |
179 |
env['ENV']['PATH'] = path |
180 |
env['ENV']['LD_LIBRARY_PATH'] = ld_library_path |
181 |
env['ENV']['PYTHONPATH'] = python_path |
182 |
|
183 |
# Setup help for options |
184 |
Help(opts.GenerateHelpText(env)) |
185 |
|
186 |
# Add some customer builders |
187 |
py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True) |
188 |
env.Append(BUILDERS = {'PyCompile' : py_builder}); |
189 |
|
190 |
if env['PLATFORM'] == "win32": |
191 |
runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', src_suffix='.exe', single_source=True) |
192 |
else: |
193 |
runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True) |
194 |
env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder}); |
195 |
|
196 |
runPyUnitTest_builder = Builder(action = scons_extensions.runPyUnitTest, suffix = '.passed', src_suffic='.py', single_source=True) |
197 |
env.Append(BUILDERS = {'RunPyUnitTest' : runPyUnitTest_builder}); |
198 |
|
199 |
# Convert the options which are held in environment variable into python variables for ease of handling and configure compilation options |
200 |
try: |
201 |
incinstall = env['incinstall'] |
202 |
env.Append(CPPPATH = [incinstall,]) |
203 |
except KeyError: |
204 |
incinstall = None |
205 |
try: |
206 |
libinstall = env['libinstall'] |
207 |
env.Append(LIBPATH = [libinstall,]) |
208 |
env.PrependENVPath('LD_LIBRARY_PATH', libinstall) |
209 |
if env['PLATFORM'] == "win32": |
210 |
env.PrependENVPath('PATH', libinstall) |
211 |
env.PrependENVPath('PATH', env['boost_lib_path']) |
212 |
except KeyError: |
213 |
libinstall = None |
214 |
try: |
215 |
pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc |
216 |
env.PrependENVPath('PYTHONPATH', env['pyinstall']) |
217 |
except KeyError: |
218 |
pyinstall = None |
219 |
try: |
220 |
dodebug = env['dodebug'] |
221 |
except KeyError: |
222 |
dodebug = None |
223 |
try: |
224 |
useMPI = env['useMPI'] |
225 |
except KeyError: |
226 |
useMPI = None |
227 |
try: |
228 |
cc_defines = env['cc_defines'] |
229 |
env.Append(CPPDEFINES = cc_defines) |
230 |
except KeyError: |
231 |
pass |
232 |
|
233 |
if 'shake71' == socket.gethostname().split('.')[0]: |
234 |
if useMPI: |
235 |
env['CC'] = 'mpicc' |
236 |
env['CXX'] = 'mpiCC' |
237 |
|
238 |
if dodebug: |
239 |
if useMPI: |
240 |
try: |
241 |
flags = env['cc_flags_debug_MPI'] |
242 |
env.Append(CCFLAGS = flags) |
243 |
except KeyError: |
244 |
pass |
245 |
else: |
246 |
try: |
247 |
flags = env['cc_flags_debug'] |
248 |
env.Append(CCFLAGS = flags) |
249 |
except KeyError: |
250 |
pass |
251 |
else: |
252 |
if useMPI: |
253 |
try: |
254 |
flags = env['cc_flags_MPI'] |
255 |
env.Append(CCFLAGS = flags) |
256 |
except KeyError: |
257 |
pass |
258 |
else: |
259 |
try: |
260 |
flags = env['cc_flags'] |
261 |
env.Append(CCFLAGS = flags) |
262 |
except KeyError: |
263 |
pass |
264 |
if dodebug: |
265 |
if useMPI: |
266 |
try: |
267 |
flags = env['cxx_flags_debug_MPI'] |
268 |
env.Append(CXXFLAGS = flags) |
269 |
except KeyError: |
270 |
pass |
271 |
else: |
272 |
try: |
273 |
flags = env['cxx_flags_debug'] |
274 |
env.Append(CXXFLAGS = flags) |
275 |
except KeyError: |
276 |
pass |
277 |
else: |
278 |
if useMPI: |
279 |
try: |
280 |
flags = env['cxx_flags_MPI'] |
281 |
env.Append(CXXFLAGS = flags) |
282 |
except KeyError: |
283 |
pass |
284 |
else: |
285 |
try: |
286 |
flags = env['cxx_flags'] |
287 |
env.Append(CXXFLAGS = flags) |
288 |
except KeyError: |
289 |
pass |
290 |
try: |
291 |
flags = env['ar_flags'] |
292 |
env.Append(ARFLAGS = flags) |
293 |
except KeyError: |
294 |
ar_flags = None |
295 |
try: |
296 |
sys_libs = env['sys_libs'] |
297 |
except KeyError: |
298 |
sys_libs = '' |
299 |
|
300 |
try: |
301 |
tar_flags = env['tar_flags'] |
302 |
env.Replace(TARFLAGS = tar_flags) |
303 |
except KeyError: |
304 |
pass |
305 |
|
306 |
try: |
307 |
includes = env['mkl_path'] |
308 |
env.Append(CPPPATH = [includes,]) |
309 |
except KeyError: |
310 |
pass |
311 |
|
312 |
try: |
313 |
lib_path = env['mkl_lib_path'] |
314 |
env.Append(LIBPATH = [lib_path,]) |
315 |
except KeyError: |
316 |
pass |
317 |
|
318 |
if useMPI: |
319 |
mkl_libs = '' |
320 |
else: |
321 |
try: |
322 |
mkl_libs = env['mkl_libs'] |
323 |
except KeyError: |
324 |
mkl_libs = '' |
325 |
|
326 |
try: |
327 |
includes = env['scsl_path'] |
328 |
env.Append(CPPPATH = [includes,]) |
329 |
except KeyError: |
330 |
pass |
331 |
|
332 |
try: |
333 |
lib_path = env['scsl_lib_path'] |
334 |
env.Append(LIBPATH = [lib_path,]) |
335 |
except KeyError: |
336 |
pass |
337 |
|
338 |
if useMPI: |
339 |
try: |
340 |
scsl_libs = env['scsl_libs_MPI'] |
341 |
except KeyError: |
342 |
scsl_libs = '' |
343 |
else: |
344 |
try: |
345 |
scsl_libs = env['scsl_libs'] |
346 |
except KeyError: |
347 |
scsl_libs = '' |
348 |
|
349 |
try: |
350 |
includes = env['umf_path'] |
351 |
env.Append(CPPPATH = [includes,]) |
352 |
except KeyError: |
353 |
pass |
354 |
|
355 |
try: |
356 |
lib_path = env['umf_lib_path'] |
357 |
env.Append(LIBPATH = [lib_path,]) |
358 |
except KeyError: |
359 |
pass |
360 |
|
361 |
if useMPI: |
362 |
umf_libs = '' |
363 |
else: |
364 |
try: |
365 |
umf_libs = env['umf_libs'] |
366 |
except KeyError: |
367 |
umf_libs = '' |
368 |
|
369 |
try: |
370 |
includes = env['ufc_path'] |
371 |
env.Append(CPPPATH = [includes,]) |
372 |
except KeyError: |
373 |
pass |
374 |
|
375 |
try: |
376 |
includes = env['amd_path'] |
377 |
env.Append(CPPPATH = [includes,]) |
378 |
except KeyError: |
379 |
pass |
380 |
|
381 |
try: |
382 |
lib_path = env['amd_lib_path'] |
383 |
env.Append(LIBPATH = [lib_path,]) |
384 |
except KeyError: |
385 |
pass |
386 |
|
387 |
if useMPI: |
388 |
amd_libs = '' |
389 |
else: |
390 |
try: |
391 |
amd_libs = env['amd_libs'] |
392 |
except KeyError: |
393 |
amd_libs = '' |
394 |
|
395 |
try: |
396 |
includes = env['blas_path'] |
397 |
env.Append(CPPPATH = [includes,]) |
398 |
except KeyError: |
399 |
pass |
400 |
|
401 |
try: |
402 |
lib_path = env['blas_lib_path'] |
403 |
env.Append(LIBPATH = [lib_path,]) |
404 |
except KeyError: |
405 |
pass |
406 |
|
407 |
try: |
408 |
blas_libs = env['blas_libs'] |
409 |
except KeyError: |
410 |
blas_libs = '' |
411 |
|
412 |
try: |
413 |
useNetCDF = env['useNetCDF'] |
414 |
except KeyError: |
415 |
useNetCDF = 'yes' |
416 |
pass |
417 |
|
418 |
if not useNetCDF == 'yes': |
419 |
print "Warning: Installation is not configured with netCDF. Some I/O function may not be available." |
420 |
|
421 |
if useNetCDF == 'yes': |
422 |
try: |
423 |
includes = env['netCDF_path'] |
424 |
env.Append(CPPPATH = [includes,]) |
425 |
except KeyError: |
426 |
pass |
427 |
|
428 |
try: |
429 |
lib_path = env['netCDF_lib_path'] |
430 |
env.Append(LIBPATH = [lib_path,]) |
431 |
except KeyError: |
432 |
pass |
433 |
|
434 |
try: |
435 |
netCDF_libs_cxx = env['netCDF_libs_cxx'] |
436 |
except KeyError: |
437 |
netCDF_libs_cxx = [ ] |
438 |
else: |
439 |
netCDF_libs_cxx=[ ] |
440 |
|
441 |
try: |
442 |
includes = env['boost_path'] |
443 |
env.Append(CPPPATH = [includes,]) |
444 |
except KeyError: |
445 |
pass |
446 |
try: |
447 |
lib_path = env['boost_lib_path'] |
448 |
env.Append(LIBPATH = [lib_path,]) |
449 |
except KeyError: |
450 |
pass |
451 |
try: |
452 |
boost_lib = env['boost_lib'] |
453 |
except KeyError: |
454 |
boost_lib = None |
455 |
try: |
456 |
includes = env['python_path'] |
457 |
env.Append(CPPPATH = [includes,]) |
458 |
except KeyError: |
459 |
pass |
460 |
try: |
461 |
lib_path = env['python_lib_path'] |
462 |
env.Append(LIBPATH = [lib_path,]) |
463 |
except KeyError: |
464 |
pass |
465 |
try: |
466 |
python_lib = env['python_lib'] |
467 |
except KeyError: |
468 |
python_lib = None |
469 |
try: |
470 |
doxygen_path = env['doxygen_path'] |
471 |
except KeyError: |
472 |
doxygen_path = None |
473 |
try: |
474 |
epydoc_path = env['epydoc_path'] |
475 |
except KeyError: |
476 |
epydoc_path = None |
477 |
try: |
478 |
includes = env['papi_path'] |
479 |
env.Append(CPPPATH = [includes,]) |
480 |
except KeyError: |
481 |
pass |
482 |
try: |
483 |
lib_path = env['papi_lib_path'] |
484 |
env.Append(LIBPATH = [lib_path,]) |
485 |
except KeyError: |
486 |
pass |
487 |
try: |
488 |
papi_libs = env['papi_libs'] |
489 |
except KeyError: |
490 |
papi_libs = None |
491 |
|
492 |
|
493 |
try: |
494 |
src_zipfile = env.File(env['src_zipfile']) |
495 |
except KeyError: |
496 |
src_zipfile = None |
497 |
try: |
498 |
test_zipfile = env.File(env['test_zipfile']) |
499 |
except KeyError: |
500 |
test_zipfile = None |
501 |
try: |
502 |
examples_zipfile = env.File(env['examples_zipfile']) |
503 |
except KeyError: |
504 |
examples_zipfile = None |
505 |
|
506 |
try: |
507 |
src_tarfile = env.File(env['src_tarfile']) |
508 |
except KeyError: |
509 |
src_tarfile = None |
510 |
try: |
511 |
test_tarfile = env.File(env['test_tarfile']) |
512 |
except KeyError: |
513 |
test_tarfile = None |
514 |
try: |
515 |
examples_tarfile = env.File(env['examples_tarfile']) |
516 |
except KeyError: |
517 |
examples_tarfile = None |
518 |
|
519 |
try: |
520 |
guide_pdf = env.File(env['guide_pdf']) |
521 |
except KeyError: |
522 |
guide_pdf = None |
523 |
|
524 |
try: |
525 |
guide_html_index = env.File('index.htm',env['guide_html']) |
526 |
except KeyError: |
527 |
guide_html_index = None |
528 |
|
529 |
try: |
530 |
api_epydoc = env.Dir(env['api_epydoc']) |
531 |
except KeyError: |
532 |
api_epydoc = None |
533 |
|
534 |
# Zipgets |
535 |
|
536 |
env.Default(libinstall) |
537 |
env.Default(incinstall) |
538 |
env.Default(pyinstall) |
539 |
env.Alias('release_src',[ src_zipfile, src_tarfile ]) |
540 |
env.Alias('release_tests',[ test_zipfile, test_tarfile]) |
541 |
env.Alias('release_examples',[ examples_zipfile, examples_tarfile]) |
542 |
env.Alias('api_epydoc',api_epydoc) |
543 |
env.Alias('guide_pdf', guide_pdf) |
544 |
env.Alias('docs',[ 'release_examples', 'guide_pdf', guide_html_index, api_epydoc]) |
545 |
env.Alias('release', ['release_src', 'release_tests', 'docs']) |
546 |
env.Alias('build_tests') # target to build all C++ tests |
547 |
env.Alias('build_py_tests') # target to build all python tests |
548 |
env.Alias('build_all_tests', [ 'build_tests', 'build_py_tests' ] ) # target to build all python tests |
549 |
env.Alias('run_tests', 'build_tests') # target to run all C++ test |
550 |
env.Alias('py_tests', 'build_py_tests') # taget to run all released python tests |
551 |
env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests |
552 |
|
553 |
# Python install - esys __init__.py |
554 |
init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET')) |
555 |
env.Alias(init_target) |
556 |
|
557 |
# Allow sconscripts to see the env |
558 |
Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs_cxx", "useNetCDF", |
559 |
"boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs", |
560 |
"sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile", |
561 |
"guide_pdf", "guide_html_index", "api_epydoc", "useMPI"]) |
562 |
|
563 |
# End initialisation section |
564 |
# Begin configuration section |
565 |
# adds this file and the scons option directore to the source tar |
566 |
release_srcfiles=[env.File('SConstruct'),]+[ env.File(x) for x in glob.glob('scons/*.py') ] |
567 |
release_testfiles=[env.File('README_TESTS'),] |
568 |
env.Zip(src_zipfile, release_srcfiles) |
569 |
env.Zip(test_zipfile, release_testfiles) |
570 |
env.Tar(src_tarfile, release_srcfiles) |
571 |
env.Tar(test_tarfile, release_testfiles) |
572 |
|
573 |
# Insert new components to be build here |
574 |
# FIXME: might be nice to replace this verbosity with a list of targets and some |
575 |
# FIXME: nifty python to create the lengthy but very similar env.Sconscript lines |
576 |
# Third Party libraries |
577 |
env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0) |
578 |
# C/C++ Libraries |
579 |
env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0) |
580 |
# bruce is removed for now as it doesn't really do anything |
581 |
# env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0) |
582 |
env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0) |
583 |
env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0) |
584 |
env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0) |
585 |
env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0) |
586 |
env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0) |
587 |
env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
588 |
env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0) |
589 |
|
590 |
# added by Ben Cumming |
591 |
env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0) |
592 |
#env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0) |