/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 712 by elspeth, Thu Apr 27 02:08:50 2006 UTC revision 898 by gross, Sun Nov 12 23:56:26 2006 UTC
# Line 1  Line 1 
1  #          Copyright 2006 by ACcESS MNRF                    #          Copyright 2006 by ACcESS MNRF
2  #                                                            #
3  #              http://www.access.edu.au                      #              http://www.access.edu.au
4  #       Primary Business: Queensland, Australia              #       Primary Business: Queensland, Australia
5  #  Licensed under the Open Software License version 3.0      #  Licensed under the Open Software License version 3.0
6  #     http://www.opensource.org/licenses/osl-3.0.php        #     http://www.opensource.org/licenses/osl-3.0.php
7  #                                                            #
8  #  #
9  #  #
10    
11  # top-level Scons configuration file for all esys13 modules  # top-level Scons configuration file for all esys13 modules
12  # Begin initialisation Section  # Begin initialisation Section
13  # all of this section just intialises default environments and helper  # all of this section just intialises default environments and helper
14  # scripts. You shouldn't need to modify this section.  # scripts. You shouldn't need to modify this section.
15  EnsureSConsVersion(0,96,91)  EnsureSConsVersion(0,96,91)
16  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
# Line 18  EnsurePythonVersion(2,3) Line 18  EnsurePythonVersion(2,3)
18  # import tools:  # import tools:
19  import glob  import glob
20  import sys, os  import sys, os
21    import socket
22  # Add our extensions  # Add our extensions
23  if sys.path.count('scons')==0: sys.path.append('scons')  if sys.path.count('scons')==0: sys.path.append('scons')
24  import scons_extensions  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  # Default options and options help text
51  # These are defaults and can be overridden using command line arguments or an options file.  # 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  # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used
# Line 29  import scons_extensions Line 54  import scons_extensions
54  if ARGUMENTS.get('options_file',0):  if ARGUMENTS.get('options_file',0):
55     options_file = ARGUMENTS.get('options_file',0)     options_file = ARGUMENTS.get('options_file',0)
56  else:  else:
    import socket  
57     from string import ascii_letters,digits     from string import ascii_letters,digits
58     hostname=""     hostname=""
59     for s in socket.gethostname().split('.')[0]:     for s in socket.gethostname().split('.')[0]:
# Line 42  else: Line 66  else:
66  opts = Options(options_file, ARGUMENTS)  opts = Options(options_file, ARGUMENTS)
67  opts.AddOptions(  opts.AddOptions(
68  # Where to install esys stuff  # Where to install esys stuff
69    ('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'),    ('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'),
70    ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),    ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),
71    ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),    ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),
72    ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),    ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),
73    ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"),    ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"),
74    ('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"),    ('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"),
75    ('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"),    ('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"),
76    ('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),    ('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),
77    ('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"),    ('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"),
78    ('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"),    ('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"),
79    ('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"),    ('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"),
80    ('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"),    ('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"),
81  # Compilation options  # Compilation options
82    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
83    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file),    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file),
# Line 62  opts.AddOptions( Line 86  opts.AddOptions(
86    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'),    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'),
87    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),
88    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),
89      ('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'),
90      ('cc_flags_debug_MPI', 'C compiler flags to use (Debug MPI build)', '-g -O0 -c99 -w1 -fpic -wd161'),
91      ('cxx_flags_MPI', 'C++ compiler flags to use (Release MPI build)', '-ansi -wd1563 -wd161'),
92      ('cxx_flags_debug_MPI', 'C++ compiler flags to use (Debug MPI build)', '-ansi -DDOASSERT -DDOPROF -wd1563 -wd161'),
93    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
94    ('sys_libs', 'System libraries to link with', None),    ('sys_libs', 'System libraries to link with', None),
95    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
96  # MKL  # MKL
97    PathOption('mkl_path', 'Path to MKL includes', None),    PathOption('mkl_path', 'Path to MKL includes', None),
98    PathOption('mkl_lib_path', 'Path to MKL libs', None),    PathOption('mkl_lib_path', 'Path to MKL libs', None),
99    ('mkl_libs', 'MKL libraries to link with', None),    ('mkl_libs', 'MKL libraries to link with', None),
100  # SCSL  # SCSL
101    PathOption('scsl_path', 'Path to SCSL includes', None),    PathOption('scsl_path', 'Path to SCSL includes', None),
102    PathOption('scsl_lib_path', 'Path to SCSL libs', None),    PathOption('scsl_lib_path', 'Path to SCSL libs', None),
103    ('scsl_libs', 'SCSL libraries to link with', None),    ('scsl_libs', 'SCSL libraries to link with', None),
104  # UMFPACK    ('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None),
105    PathOption('umf_path', 'Path to UMF includes', None),  # UMFPACK
106    PathOption('umf_lib_path', 'Path to UMF libs', None),    PathOption('ufc_path', 'Path to UFconfig includes', ufc_path_default),
107    ('umf_libs', 'UMF libraries to link with', None),    PathOption('umf_path', 'Path to UMFPACK includes', umf_path_default),
108      PathOption('umf_lib_path', 'Path to UMFPACK libs', umf_lib_path_default),
109      ('umf_libs', 'UMFPACK libraries to link with', umf_libs_default),
110    # AMD (used by UMFPACK)
111      PathOption('amd_path', 'Path to AMD includes', amd_path_default),
112      PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),
113      ('amd_libs', 'AMD libraries to link with', amd_libs_default),
114    # BLAS
115      PathOption('blas_path', 'Path to BLAS includes', None),
116      PathOption('blas_lib_path', 'Path to BLAS libs', None),
117      ('blas_libs', 'BLAS libraries to link with', None),
118  # Python  # Python
119  # locations of include files for python  # locations of include files for python
120    PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])),    PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])),
121    PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'),    PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'),
122    ('python_lib', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]),    ('python_lib', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]),
123  # Boost  # Boost
124    PathOption('boost_path', 'Path to Boost includes', '/usr/include'),    PathOption('boost_path', 'Path to Boost includes', '/usr/include'),
125    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),
126    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),
127  # Doc building  # Doc building
128    PathOption('doxygen_path', 'Path to Doxygen executable', None),  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),
129    PathOption('epydoc_path', 'Path to Epydoc executable', None),  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),
   PathOption('epydoc_pythonpath', 'Path to Epydoc python files', None),  
130  # PAPI  # PAPI
131    PathOption('papi_path', 'Path to PAPI includes', None),    PathOption('papi_path', 'Path to PAPI includes', None),
132    PathOption('papi_lib_path', 'Path to PAPI libs', None),    PathOption('papi_lib_path', 'Path to PAPI libs', None),
133    ('papi_libs', 'PAPI libraries to link with', None),    ('papi_libs', 'PAPI libraries to link with', None),
134    # MPI
135      BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
136  )  )
137    
138  # Initialise Scons Build Environment  # Initialise Scons Build Environment
# Line 118  except KeyError: Line 157  except KeyError:
157  # environment which isn't the "scons way"  # environment which isn't the "scons way"
158  # 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)  # 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)
159  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix
160    
161  if os.name != "nt" and os.uname()[4]=='ia64':  if os.name != "nt" and os.uname()[4]=='ia64':
162     env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts)     env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts)
163     env['ENV']['PATH'] = path     env['ENV']['PATH'] = path
# Line 127  if os.name != "nt" and os.uname()[4]=='i Line 166  if os.name != "nt" and os.uname()[4]=='i
166     if env['CXX'] == 'icpc':     if env['CXX'] == 'icpc':
167        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        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
168  elif os.name == "nt":  elif os.name == "nt":
    # FIXME: Need to implement equivalent of ld library path for windoze  
169     env = Environment(tools = ['default', 'intelc'], options = opts)     env = Environment(tools = ['default', 'intelc'], options = opts)
170     env['ENV']['PYTHONPATH'] = python_path     env['ENV']['PYTHONPATH'] = python_path
171  else:  else:
# Line 157  try: Line 195  try:
195     incinstall = env['incinstall']     incinstall = env['incinstall']
196     env.Append(CPPPATH = [incinstall,])     env.Append(CPPPATH = [incinstall,])
197  except KeyError:  except KeyError:
198     incinstall = None       incinstall = None
199  try:  try:
200     libinstall = env['libinstall']     libinstall = env['libinstall']
201     env.Append(LIBPATH = [libinstall,])     env.Append(LIBPATH = [libinstall,])
202     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
203       if env['PLATFORM'] == "win32":
204          env.PrependENVPath('PATH', libinstall)
205          env.PrependENVPath('PATH', env['boost_lib_path'])
206  except KeyError:  except KeyError:
207     libinstall = None       libinstall = None
208  try:  try:
209     pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc     pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc
210     env.PrependENVPath('PYTHONPATH', env['pyinstall'])     env.PrependENVPath('PYTHONPATH', env['pyinstall'])
211  except KeyError:  except KeyError:
212     pyinstall = None       pyinstall = None
213  try:  try:
214     dodebug = env['dodebug']     dodebug = env['dodebug']
215  except KeyError:  except KeyError:
216     dodebug = None       dodebug = None
217    try:
218       useMPI = env['useMPI']
219    except KeyError:
220       useMPI = None
221  try:  try:
222     cc_defines = env['cc_defines']     cc_defines = env['cc_defines']
223     env.Append(CPPDEFINES = [cc_defines,])     env.Append(CPPDEFINES = cc_defines)
224  except KeyError:  except KeyError:
225     pass     pass
226    
227    if 'shake71' == socket.gethostname().split('.')[0]:
228      if useMPI:
229        env['CC'] = 'mpicc'
230        env['CXX'] = 'mpiCC'
231    
232  if dodebug:  if dodebug:
233     try:    if useMPI:
234        try:
235          flags = env['cc_flags_debug_MPI']
236          env.Append(CCFLAGS = flags)
237        except KeyError:
238          pass
239      else:
240        try:
241        flags = env['cc_flags_debug']        flags = env['cc_flags_debug']
242        env.Append(CCFLAGS = flags)        env.Append(CCFLAGS = flags)
243     except KeyError:      except KeyError:
244        pass        pass
245  else:  else:
246      if useMPI:
247     try:     try:
248        flags = env['cc_flags']       flags = env['cc_flags_MPI']
249        env.Append(CCFLAGS = flags)       env.Append(CCFLAGS = flags)
250     except KeyError:     except KeyError:
251        pass        pass
252      else:
 if dodebug:  
253     try:     try:
254        flags = env['cxx_flags_debug']        flags = env['cc_flags']
255        env.Append(CXXFLAGS = flags)        env.Append(CCFLAGS = flags)
256     except KeyError:     except KeyError:
257        pass        pass
258    if dodebug:
259       if useMPI:
260         try:
261            flags = env['cxx_flags_debug_MPI']
262            env.Append(CXXFLAGS = flags)
263         except KeyError:
264            pass
265       else:
266         try:
267            flags = env['cxx_flags_debug']
268            env.Append(CXXFLAGS = flags)
269         except KeyError:
270            pass
271  else:  else:
272     try:     if useMPI:
273        flags = env['cxx_flags']       try:
274        env.Append(CXXFLAGS = flags)          flags = env['cxx_flags_MPI']
275     except KeyError:          env.Append(CXXFLAGS = flags)
276        pass       except KeyError:
277            pass
278       else:
279         try:
280            flags = env['cxx_flags']
281            env.Append(CXXFLAGS = flags)
282         except KeyError:
283            pass
284  try:  try:
285     flags = env['ar_flags']     flags = env['ar_flags']
286     env.Append(ARFLAGS = flags)     env.Append(ARFLAGS = flags)
287  except KeyError:  except KeyError:
288     ar_flags = None       ar_flags = None
289  try:  try:
290     sys_libs = env['sys_libs']     sys_libs = env['sys_libs']
291  except KeyError:  except KeyError:
292     sys_libs = ''     sys_libs = ''
293    
294  try:  try:
295     tar_flags = env['tar_flags']     tar_flags = env['tar_flags']
# Line 232  try: Line 309  try:
309  except KeyError:  except KeyError:
310     pass     pass
311    
312  try:  if useMPI:
    mkl_libs = env['mkl_libs']  
 except KeyError:  
313     mkl_libs = ''     mkl_libs = ''
314    else:
315       try:
316          mkl_libs = env['mkl_libs']
317       except KeyError:
318          mkl_libs = ''
319    
320  try:  try:
321     includes = env['scsl_path']     includes = env['scsl_path']
322     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
323  except KeyError:  except KeyError:
324     pass     pass
325    
326  try:  try:
327     lib_path = env['scsl_lib_path']     lib_path = env['scsl_lib_path']
328     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
329  except KeyError:  except KeyError:
330     pass     pass
331  try:  
332     scsl_libs = env['scsl_libs']  if useMPI:
333  except KeyError:    try:
334     scsl_libs = ''      scsl_libs = env['scsl_libs_MPI']
335      except KeyError:
336        scsl_libs = ''
337    else:
338      try:
339        scsl_libs = env['scsl_libs']
340      except KeyError:
341        scsl_libs = ''
342    
343  try:  try:
344     includes = env['umf_path']     includes = env['umf_path']
345     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
346  except KeyError:  except KeyError:
347     pass     pass
348    
349  try:  try:
350     lib_path = env['umf_lib_path']     lib_path = env['umf_lib_path']
351     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
352  except KeyError:  except KeyError:
353     pass     pass
354    
355    if useMPI:
356        umf_libs = ''
357    else:
358       try:
359          umf_libs = env['umf_libs']
360       except KeyError:
361          umf_libs = ''
362    
363    try:
364       includes = env['ufc_path']
365       env.Append(CPPPATH = [includes,])
366    except KeyError:
367       pass
368    
369  try:  try:
370     umf_libs = env['umf_libs']     includes = env['amd_path']
371       env.Append(CPPPATH = [includes,])
372  except KeyError:  except KeyError:
373     umf_libs = ''     pass
374    
375    try:
376       lib_path = env['amd_lib_path']
377       env.Append(LIBPATH = [lib_path,])
378    except KeyError:
379       pass
380    
381    if useMPI:
382        amd_libs = ''
383    else:
384       try:
385          amd_libs = env['amd_libs']
386       except KeyError:
387          amd_libs = ''
388    
389    try:
390       includes = env['blas_path']
391       env.Append(CPPPATH = [includes,])
392    except KeyError:
393       pass
394    
395    try:
396       lib_path = env['blas_lib_path']
397       env.Append(LIBPATH = [lib_path,])
398    except KeyError:
399       pass
400    
401    try:
402       blas_libs = env['blas_libs']
403    except KeyError:
404       blas_libs = ''
405    
406  try:  try:
407     includes = env['boost_path']     includes = env['boost_path']
408     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 277  except KeyError: Line 416  except KeyError:
416  try:  try:
417     boost_lib = env['boost_lib']     boost_lib = env['boost_lib']
418  except KeyError:  except KeyError:
419     boost_lib = None       boost_lib = None
420  try:  try:
421     includes = env['python_path']     includes = env['python_path']
422     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 291  except KeyError: Line 430  except KeyError:
430  try:  try:
431     python_lib = env['python_lib']     python_lib = env['python_lib']
432  except KeyError:  except KeyError:
433     python_lib = None       python_lib = None
434  try:  try:
435     doxygen_path = env['doxygen_path']     doxygen_path = env['doxygen_path']
436  except KeyError:  except KeyError:
437     doxygen_path = None       doxygen_path = None
438  try:  try:
439     epydoc_path = env['epydoc_path']     epydoc_path = env['epydoc_path']
440  except KeyError:  except KeyError:
441     epydoc_path = None       epydoc_path = None
 try:  
    epydoc_pythonpath = env['epydoc_pythonpath']  
 except KeyError:  
    epydoc_pythonpath = None    
442  try:  try:
443     includes = env['papi_path']     includes = env['papi_path']
444     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 317  except KeyError: Line 452  except KeyError:
452  try:  try:
453     papi_libs = env['papi_libs']     papi_libs = env['papi_libs']
454  except KeyError:  except KeyError:
455     papi_libs = None       papi_libs = None
456    
457    
458  try:  try:
459     src_zipfile = env.File(env['src_zipfile'])     src_zipfile = env.File(env['src_zipfile'])
460  except KeyError:  except KeyError:
461     src_zipfile = None       src_zipfile = None
462  try:  try:
463     test_zipfile = env.File(env['test_zipfile'])     test_zipfile = env.File(env['test_zipfile'])
464  except KeyError:  except KeyError:
465     test_zipfile = None       test_zipfile = None
466  try:  try:
467     examples_zipfile = env.File(env['examples_zipfile'])     examples_zipfile = env.File(env['examples_zipfile'])
468  except KeyError:  except KeyError:
469     examples_zipfile = None       examples_zipfile = None
470    
471  try:  try:
472     src_tarfile = env.File(env['src_tarfile'])     src_tarfile = env.File(env['src_tarfile'])
473  except KeyError:  except KeyError:
474     src_tarfile = None       src_tarfile = None
475  try:  try:
476     test_tarfile = env.File(env['test_tarfile'])     test_tarfile = env.File(env['test_tarfile'])
477  except KeyError:  except KeyError:
478     test_tarfile = None       test_tarfile = None
479  try:  try:
480     examples_tarfile = env.File(env['examples_tarfile'])     examples_tarfile = env.File(env['examples_tarfile'])
481  except KeyError:  except KeyError:
482     examples_tarfile = None       examples_tarfile = None
483    
484  try:  try:
485     guide_pdf = env.File(env['guide_pdf'])     guide_pdf = env.File(env['guide_pdf'])
486  except KeyError:  except KeyError:
487     guide_pdf = None       guide_pdf = None
488    
489  try:  try:
490     guide_html_index = env.File('index.htm',env['guide_html'])     guide_html_index = env.File('index.htm',env['guide_html'])
491  except KeyError:  except KeyError:
492     guide_html_index = None       guide_html_index = None
493    
494  try:  try:
495     api_epydoc = env.Dir(env['api_epydoc'])     api_epydoc = env.Dir(env['api_epydoc'])
496  except KeyError:  except KeyError:
497     api_epydoc = None       api_epydoc = None
498    
499  # Zipgets  # Zipgets
500      
501  env.Default(libinstall)  env.Default(libinstall)
502  env.Default(incinstall)  env.Default(incinstall)
503  env.Default(pyinstall)  env.Default(pyinstall)
504  env.Alias('release_src',[ src_zipfile, src_tarfile ])    env.Alias('release_src',[ src_zipfile, src_tarfile ])
505  env.Alias('release_tests',[ test_zipfile, test_tarfile])  env.Alias('release_tests',[ test_zipfile, test_tarfile])
506  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])
507  env.Alias('docs',[ 'release_examples', guide_pdf, guide_html_index, api_epydoc])  env.Alias('api_epydoc',api_epydoc)
508    env.Alias('guide_pdf', guide_pdf)
509    env.Alias('docs',[ 'release_examples', 'guide_pdf', guide_html_index, api_epydoc])
510  env.Alias('release', ['release_src', 'release_tests', 'docs'])  env.Alias('release', ['release_src', 'release_tests', 'docs'])
511  env.Alias('build_tests')    # target to build all C++ tests  env.Alias('build_tests')    # target to build all C++ tests
512  env.Alias('build_py_tests') # target to build all python tests  env.Alias('build_py_tests') # target to build all python tests
# Line 379  env.Alias('py_tests', 'build_py_tests') Line 516  env.Alias('py_tests', 'build_py_tests')
516  env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests  env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests
517    
518  # Python install - esys __init__.py  # Python install - esys __init__.py
519  # This is just an empty file but stills need to be touched so add a special target and Command. Note you can't use the scons Touch() function as it will not  init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))
520  # create the file if it doesn't exist  env.Alias(init_target)
 env.Command(pyinstall+'/__init__.py', None, 'touch $TARGET')  
521    
522  # Allow sconscripts to see the env  # Allow sconscripts to see the env
523  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs",  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs",
524      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "epydoc_pythonpath", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
525          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",
526          "guide_pdf", "guide_html_index", "api_epydoc"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])
527    
528  # End initialisation section  # End initialisation section
529  # Begin configuration section  # Begin configuration section
# Line 412  env.SConscript(dirs = ['esysUtils/src'], Line 548  env.SConscript(dirs = ['esysUtils/src'],
548  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)
549  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)
550  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)
551  #env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) not part of beta.0  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)
552    env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)
553    
554    # added by Ben Cumming
555    env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)
556    #env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0)

Legend:
Removed from v.712  
changed lines
  Added in v.898

  ViewVC Help
Powered by ViewVC 1.1.26