/[escript]/trunk/SConstruct
ViewVC logotype

Annotation of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1039 - (hide annotations)
Fri Mar 16 08:42:17 2007 UTC (11 years, 6 months ago) by phornby
File size: 19955 byte(s)
Just trying to get the intelc version going.


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

  ViewVC Help
Powered by ViewVC 1.1.26