/[escript]/trunk/SConstruct
ViewVC logotype

Annotation of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1083 - (hide annotations)
Thu Apr 12 01:15:01 2007 UTC (12 years ago) by ksteube
File size: 20021 byte(s)
Install prefix: can now use

	scons prefix=/some/dir

to build and install into another directory.

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

  ViewVC Help
Powered by ViewVC 1.1.26