/[escript]/branches/dirac/SConstruct
ViewVC logotype

Contents of /branches/dirac/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1137 - (show annotations)
Thu May 10 08:11:31 2007 UTC (12 years, 1 month ago) by gross
Original Path: trunk/SConstruct
File size: 23266 byte(s)
This version passes the tests on windows except for 

   * vtk
   * netCDF

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

  ViewVC Help
Powered by ViewVC 1.1.26