/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1026 by phornby, Tue Mar 13 08:25:00 2007 UTC revision 1235 by phornby, Mon Aug 13 00:25:29 2007 UTC
# Line 4  Line 4 
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  # top-level Scons configuration file for all esys13 modules  # top-level Scons configuration file for all esys13 modules
9  # Begin initialisation Section  # Begin initialisation Section
# Line 15  Line 12 
12  EnsureSConsVersion(0,96,91)  EnsureSConsVersion(0,96,91)
13  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
14    
15  # import tools:  #===============================================================
16    #   import tools:
17  import glob  import glob
18  import sys, os  import sys, os
19  import socket  import socket
# Line 23  import socket Line 21  import socket
21  if sys.path.count('scons')==0: sys.path.append('scons')  if sys.path.count('scons')==0: sys.path.append('scons')
22  import scons_extensions  import scons_extensions
23    
24  # check if UMFPACK is installed on the system:  #===============================================================
 if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'):  
    umf_path_default='/opt/UMFPACK/Include'  
    umf_lib_path_default='/opt/UMFPACK/Lib'  
    umf_libs_default=['umfpack']  
 else:  
    umf_path_default=None  
    umf_lib_path_default=None  
    umf_libs_default=None  
25    
26  if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):  tools_prefix="/usr"
    amd_path_default='/opt/AMD/Include'  
    amd_lib_path_default='/opt/AMD/Lib'  
    amd_libs_default=['amd']  
 else:  
    amd_path_default=None  
    amd_lib_path_default=None  
    amd_libs_default=None  
27    
28  if os.path.isdir('/opt/UFconfig'):  #==============================================================================================    
29     ufc_path_default='/opt/UFconfig'  #    
30  else:  #    get the installation prefix
31     ufc_path_default=None  #
32    prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)
33    
34    # We may also need to know where python's site-packages subdirectory lives
35    python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
36    
37    if prefix == "/usr":
38       # Install as a standard python package in /usr/lib64 if available, else in /usr/lib
39       if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):
40          dir_packages =  prefix+"/lib64/"+python_version+"/site-packages"
41          dir_libraries = prefix+"/lib64"
42       elif os.path.isdir(prefix+"/lib/"+python_version+"/site-packages"):
43          dir_packages =  prefix+"/lib/"+python_version+"/site-packages"
44          dir_libraries = prefix+"/lib"
45       else:
46          print "Install prefix is /usr but couldn't find python package directory in either"
47          print "/usr/lib64/"+python_version+"/site-packages or /usr/lib/"+python_version+"/site-packages"
48          sys.exit(1)
49       dir_examples = prefix+"/share/doc/esys"
50    else:
51       # Install using the usual escript directory structure
52       dir_packages = prefix
53       dir_libraries = prefix+"/lib"
54       dir_examples = prefix
55    dir_packages += "/esys"
56    dir_examples += "/examples"
57    
58    print "Install prefix is: ", prefix
59    print " python packages will be installed in:   ", dir_packages
60    print " libraries will be installed in:     ", dir_libraries
61    print " examples will be installed in:      ", dir_examples
62    
63    #==============================================================================================    
64    
65  # Default options and options help text  # Default options and options help text
66  # 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.
67  # 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
68  # DO NOT CHANGE THEM HERE  # DO NOT CHANGE THEM HERE
69    # Where to install?
70    #==============================================================================================    
71    #    
72    #    get the options file if present:
73    #
74  if ARGUMENTS.get('options_file',0):  if ARGUMENTS.get('options_file',0):
75     options_file = ARGUMENTS.get('options_file',0)     options_file = ARGUMENTS.get('options_file',0)
76  else:  else:
# Line 61  else: Line 81  else:
81           hostname+=s           hostname+=s
82        else:        else:
83           hostname+="_"           hostname+="_"
84     options_file = "scons/"+hostname+"_options.py"     options_file = os.path.join("scons",hostname+"_options.py")
85  print "option file is ",options_file    
86    if os.path.isfile(options_file):
87       print "option file is ",options_file,"."
88    else:
89       print "option file is ",options_file, "(not present)."
90    # and load it
91  opts = Options(options_file, ARGUMENTS)  opts = Options(options_file, ARGUMENTS)
92    #================================================================
93    #
94    #   check if UMFPACK is installed on the system:
95    #
96    uf_root=None
97    for i in [ 'UMFPACK', 'umfpack', 'ufsparse', 'UFSPARSE']:
98       if os.path.isdir(os.path.join(tools_prefix,'include',i)):
99           uf_root=i
100           print i," is used form ",tools_prefix
101           break
102    if not uf_root==None:
103       umf_path_default=os.path.join(tools_prefix,'include',uf_root)
104       umf_lib_path_default=os.path.join(tools_prefix,'lib')
105       umf_libs_default=['umfpack']
106       amd_path_default=os.path.join(tools_prefix,'include',uf_root)
107       amd_lib_path_default=os.path.join(tools_prefix,'lib')
108       amd_libs_default=['amd']
109       ufc_path_default=os.path.join(tools_prefix,'include',uf_root)
110    else:
111       umf_path_default=None
112       umf_lib_path_default=None
113       umf_libs_default=None
114       amd_path_default=None
115       amd_lib_path_default=None
116       amd_libs_default=None
117       ufc_path_default=None
118    #
119    #==========================================================================
120    #
121    #    python installation:
122    #
123    python_path_default=os.path.join(tools_prefix,'include','python%s.%s'%(sys.version_info[0],sys.version_info[1]))
124    python_lib_path_default=os.path.join(tools_prefix,'lib')
125    python_lib_default="python%s.%s"%(sys.version_info[0],sys.version_info[1])
126    
127    #==========================================================================
128    #
129    #    boost installation:
130    #
131    boost_path_default=os.path.join(tools_prefix,'include')
132    boost_lib_path_default=os.path.join(tools_prefix,'lib')
133    boost_lib_default=['boost_python']
134    #==========================================================================
135    #
136    #    check if netCDF is installed on the system:
137    #
138    netCDF_path_default=os.path.join(tools_prefix,'include','netcdf-3')
139    netCDF_lib_path_default=os.path.join(tools_prefix,'lib','netcdf-3')
140    
141    if os.path.isdir(netCDF_path_default) and os.path.isdir(netCDF_lib_path_default):
142         useNetCDF_default='yes'
143         netCDF_libs_default=[ 'netcdf_c++', 'netcdf' ]
144    else:
145         useNetCDF_default='no'
146         netCDF_path_default=None
147         netCDF_lib_path_default=None
148         netCDF_libs_default=None
149    
150    #==========================================================================
151    #
152    #    compile:
153    #
154    cc_flags_default='-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'
155    cc_flags_debug_default='-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'
156    cxx_flags_default='--no-warn -ansi'
157    cxx_flags_debug_default='--no-warn -ansi -DDOASSERT'
158    #==============================================================================================    
159    # Default options and options help text
160    # These are defaults and can be overridden using command line arguments or an options file.
161    # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used
162    # DO NOT CHANGE THEM HERE
163  opts.AddOptions(  opts.AddOptions(
164  # Where to install esys stuff  # Where to install esys stuff
165    ('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'),    ('incinstall', 'where the esys headers will be installed',             Dir('#.').abspath+'/include'),
166    ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),    ('libinstall', 'where the esys libraries will be installed',           dir_libraries),
167    ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),    ('pyinstall', 'where the esys python modules will be installed',       dir_packages),
168    ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),    ('exinstall', 'where the esys examples will be installed',             dir_examples),
169    ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"),    ('src_zipfile', 'the source zip file will be installed.',              Dir('#.').abspath+"/release/escript_src.zip"),
170    ('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"),    ('test_zipfile', 'the test zip file will be installed.',               Dir('#.').abspath+"/release/escript_tests.zip"),
171    ('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"),    ('src_tarfile', 'the source tar file will be installed.',              Dir('#.').abspath+"/release/escript_src.tar.gz"),
172    ('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),    ('test_tarfile', 'the test tar file will be installed.',               Dir('#.').abspath+"/release/escript_tests.tar.gz"),
173    ('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"),    ('examples_tarfile', 'the examples tar file will be installed.',       Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),
174    ('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"),    ('examples_zipfile', 'the examples zip file will be installed.',       Dir('#.').abspath+"/release/doc/escript_examples.zip"),
175    ('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"),    ('guide_pdf', 'name of the user guide in pdf format',                  Dir('#.').abspath+"/release/doc/user/guide.pdf"),
176    ('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"),    ('api_epydoc', 'name of the epydoc api docs directory',                Dir('#.').abspath+"/release/doc/epydoc"),
177      ('guide_html', 'name of the directory for user guide in html format',  Dir('#.').abspath+"/release/doc/user/html"),
178      ('api_doxygen', 'name of the doxygen api docs directory',prefix+"/release/doc/doxygen"),
179  # Compilation options  # Compilation options
180    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
181    ('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),
182    ('cc_defines','C/C++ defines to use', None),    ('cc_defines','C/C++ defines to use', None),
183    ('cc_flags','C compiler flags to use (Release build)', '-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas'),    ('cc_flags','C compiler flags to use (Release build)', cc_flags_default),
184    ('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)', cc_flags_debug_default),
185    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),
186    ('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)', cxx_flags_debug_default),
   ('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'),  
   ('cc_flags_debug_MPI', 'C compiler flags to use (Debug MPI build)', '-g -O0 -c99 -w1 -fpic -wd161'),  
   ('cxx_flags_MPI', 'C++ compiler flags to use (Release MPI build)', '-ansi -wd1563 -wd161'),  
   ('cxx_flags_debug_MPI', 'C++ compiler flags to use (Debug MPI build)', '-ansi -DDOASSERT -DDOPROF -wd1563 -wd161'),  
187    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
188    ('sys_libs', 'System libraries to link with', None),    ('sys_libs', 'System libraries to link with', None),
189    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
# Line 117  opts.AddOptions( Line 210  opts.AddOptions(
210    PathOption('blas_lib_path', 'Path to BLAS libs', None),    PathOption('blas_lib_path', 'Path to BLAS libs', None),
211    ('blas_libs', 'BLAS libraries to link with', None),    ('blas_libs', 'BLAS libraries to link with', None),
212  # netCDF  # netCDF
213    ('useNetCDF', 'switch on/off the usage of netCDF', 'yes'),    ('useNetCDF', 'switch on/off the usage of netCDF', useNetCDF_default),
214    PathOption('netCDF_path', 'Path to netCDF includes', '/usr/local/include'),    PathOption('netCDF_path', 'Path to netCDF includes', netCDF_path_default),
215    PathOption('netCDF_lib_path', 'Path to netCDF libs', '/usr/local/lib'),    PathOption('netCDF_lib_path', 'Path to netCDF libs', netCDF_lib_path_default),
216    ('netCDF_libs_cxx', 'netCDF C++ libraries to link with', [ 'netcdf_c++', 'netcdf'] ),    ('netCDF_libs', 'netCDF C++ libraries to link with', netCDF_libs_default),
217  # Python  # Python
218  # locations of include files for python  # locations of include files for python
219    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', python_path_default),
220    PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'),    PathOption('python_lib_path', 'Path to Python libs', python_lib_path_default),
221    ('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_lib_default),
222  # Boost  # Boost
223    PathOption('boost_path', 'Path to Boost includes', '/usr/include'),    PathOption('boost_path', 'Path to Boost includes', boost_path_default),
224    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),    PathOption('boost_lib_path', 'Path to Boost libs', boost_lib_path_default),
225    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),    ('boost_lib', 'Boost libraries to link with', boost_lib_default),
226  # Doc building  # Doc building
227  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),
228  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),
# Line 140  opts.AddOptions( Line 233  opts.AddOptions(
233  # MPI  # MPI
234    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
235  )  )
236  # Note: On the Altix the intel compilers are not automatically  #=================================================================================================
237  # detected by scons intelc.py script. The Altix has a different directory  #
238  # path and in some locations the "modules" facility is used to support  #   Note: On the Altix the intel compilers are not automatically
239  # multiple compiler versions. This forces the need to import the users PATH  #   detected by scons intelc.py script. The Altix has a different directory
240  # environment which isn't the "scons way"  #   path and in some locations the "modules" facility is used to support
241  # 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)  #   multiple compiler versions. This forces the need to import the users PATH
242  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix  #   environment which isn't the "scons way"
243    #   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)
244  if os.name != "nt" and os.uname()[4]=='ia64':  #   FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix
245     env = Environment(tools = ['default', 'intelc'], options = opts)  #
246     if env['CXX'] == 'icpc':  IS_WINDOWS_PLATFORM = (os.name== "nt")
247        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  
248  elif os.name == "nt":  if IS_WINDOWS_PLATFORM:
249     env = Environment(tools = ['default', 'msvc'], options = opts)        env = Environment(tools = ['default', 'msvc'], options = opts)
250  else:  else:
251     env = Environment(tools = ['default'], options = opts)     if os.uname()[4]=='ia64':
252  # Initialise Scons Build Environment        env = Environment(tools = ['default', 'intelc'], options = opts)
253  # check for user environment variables we are interested in        if env['CXX'] == 'icpc':
254             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
255       else:
256          env = Environment(tools = ['default'], options = opts)
257    Help(opts.GenerateHelpText(env))
258    
259    #=================================================================================================
260    #
261    #     Initialise Scons Build Environment
262    #     check for user environment variables we are interested in
263  try:  try:
264     python_path = os.environ['PYTHONPATH']     python_path = os.environ['PYTHONPATH']
265     env['ENV']['PYTHONPATH'] = python_path     env['ENV']['PYTHONPATH'] = python_path
# Line 165  except KeyError: Line 267  except KeyError:
267     python_path = ''     python_path = ''
268    
269  try:  try:
270       omp_num_threads = os.environ['OMP_NUM_THREADS']
271    except KeyError:
272       omp_num_threads = 1
273    env['ENV']['OMP_NUM_THREADS'] = omp_num_threads
274    
275    try:
276       env['ENV']['DISPLAY'] = os.environ['DISPLAY']
277       env['ENV']['XAUTHORITY'] = os.environ['XAUTHORITY']
278    except KeyError:
279       pass
280    
281    try:
282     path = os.environ['PATH']     path = os.environ['PATH']
283     env['ENV']['PATH'] = path     env['ENV']['PATH'] = path
284  except KeyError:  except KeyError:
# Line 174  try: Line 288  try:
288     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path
289  except KeyError:  except KeyError:
290     ld_library_path = ''     ld_library_path = ''
291    #==========================================================================
292    #
293  # Setup help for options  #    Add some customer builders
294  Help(opts.GenerateHelpText(env))  #
   
 # Add some customer builders  
295  py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)  py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)
296  env.Append(BUILDERS = {'PyCompile' : py_builder});  env.Append(BUILDERS = {'PyCompile' : py_builder});
297    
298  if env['PLATFORM'] == "win32":  # TODO: use the inbuilt scons suffix variable.
299    if IS_WINDOWS_PLATFORM:
300     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', src_suffix='.exe', single_source=True)     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', src_suffix='.exe', single_source=True)
301  else:  else:
302     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
# Line 200  except KeyError: Line 313  except KeyError:
313     incinstall = None     incinstall = None
314  try:  try:
315     libinstall = env['libinstall']     libinstall = env['libinstall']
316     env.Append(LIBPATH = [libinstall,])     env.Append(LIBPATH = [libinstall,]) # Adds -L for building of libescript.so libfinley.so escriptcpp.so finleycpp.so
317     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
318     if env['PLATFORM'] == "win32":     if env['PLATFORM'] == "win32":
319        env.PrependENVPath('PATH', libinstall)        env.PrependENVPath('PATH', libinstall)
# Line 208  try: Line 321  try:
321  except KeyError:  except KeyError:
322     libinstall = None     libinstall = None
323  try:  try:
324     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'] # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc
325     env.PrependENVPath('PYTHONPATH', env['pyinstall'])     env.PrependENVPath('PYTHONPATH', env['pyinstall'])
326  except KeyError:  except KeyError:
327     pyinstall = None     pyinstall = None
328  try:  try:
329       exinstall = env['exinstall']
330    except KeyError:
331       exinstall = None
332    try:
333     dodebug = env['dodebug']     dodebug = env['dodebug']
334  except KeyError:  except KeyError:
335     dodebug = None     dodebug = None
# Line 226  try: Line 343  try:
343  except KeyError:  except KeyError:
344     pass     pass
345    
 if 'shake71' == socket.gethostname().split('.')[0]:  
   if useMPI:  
     env['CC'] = 'mpicc'  
     env['CXX'] = 'mpiCC'  
   
346  if dodebug:  if dodebug:
347    if useMPI:    if useMPI:
348      try:      try:
# Line 291  except KeyError: Line 403  except KeyError:
403  try:  try:
404     sys_libs = env['sys_libs']     sys_libs = env['sys_libs']
405  except KeyError:  except KeyError:
406     sys_libs = ''     sys_libs = []
407    
408  try:  try:
409     tar_flags = env['tar_flags']     tar_flags = env['tar_flags']
# Line 312  except KeyError: Line 424  except KeyError:
424     pass     pass
425    
426  if useMPI:  if useMPI:
427     mkl_libs = ''     mkl_libs = []
428  else:  else:
429     try:     try:
430        mkl_libs = env['mkl_libs']        mkl_libs = env['mkl_libs']
431     except KeyError:     except KeyError:
432        mkl_libs = ''        mkl_libs = []
433    
434  try:  try:
435     includes = env['scsl_path']     includes = env['scsl_path']
# Line 335  if useMPI: Line 447  if useMPI:
447    try:    try:
448      scsl_libs = env['scsl_libs_MPI']      scsl_libs = env['scsl_libs_MPI']
449    except KeyError:    except KeyError:
450      scsl_libs = ''      scsl_libs = []
451  else:  else:
452    try:    try:
453      scsl_libs = env['scsl_libs']      scsl_libs = env['scsl_libs']
454    except KeyError:    except KeyError:
455      scsl_libs = ''      scsl_libs = []
456    
457  try:  try:
458     includes = env['umf_path']     includes = env['umf_path']
# Line 355  except KeyError: Line 467  except KeyError:
467     pass     pass
468    
469  if useMPI:  if useMPI:
470      umf_libs = ''      umf_libs = []
471  else:  else:
472     try:     try:
473        umf_libs = env['umf_libs']        umf_libs = env['umf_libs']
474     except KeyError:     except KeyError:
475        umf_libs = ''        umf_libs = []
476    
477  try:  try:
478     includes = env['ufc_path']     includes = env['ufc_path']
# Line 381  except KeyError: Line 493  except KeyError:
493     pass     pass
494    
495  if useMPI:  if useMPI:
496      amd_libs = ''      amd_libs = []
497  else:  else:
498     try:     try:
499        amd_libs = env['amd_libs']        amd_libs = env['amd_libs']
500     except KeyError:     except KeyError:
501        amd_libs = ''        amd_libs = []
502    
503  try:  try:
504     includes = env['blas_path']     includes = env['blas_path']
# Line 403  except KeyError: Line 515  except KeyError:
515  try:  try:
516     blas_libs = env['blas_libs']     blas_libs = env['blas_libs']
517  except KeyError:  except KeyError:
518     blas_libs = ''     blas_libs = []
519    
520  try:  try:
521     useNetCDF = env['useNetCDF']     useNetCDF = env['useNetCDF']
# Line 423  if useNetCDF == 'yes': Line 535  if useNetCDF == 'yes':
535    
536     try:     try:
537        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
538        env.Append(LIBPATH = [lib_path,])        if IS_WINDOWS_PLATFORM: env['ENV']['PATH']+=";"+lib_path
539          env.Append(LIBPATH = [ lib_path, ])
540     except KeyError:     except KeyError:
541        pass        pass
542    
543     try:     try:
544        netCDF_libs_cxx = env['netCDF_libs_cxx']        netCDF_libs = env['netCDF_libs']
545     except KeyError:     except KeyError:
546        netCDF_libs_cxx = [ ]        netCDF_libs = [ ]
547  else:  else:
548     netCDF_libs_cxx=[ ]     netCDF_libs=[ ]
549    
550  try:  try:
551     includes = env['boost_path']     includes = env['boost_path']
# Line 527  try: Line 640  try:
640  except KeyError:  except KeyError:
641     api_epydoc = None     api_epydoc = None
642    
643  # Zipgets  try:
644       api_doxygen = env.Dir(env['api_doxygen'])
645    except KeyError:
646       api_doxygen = None
647    
648    # Zipgets
649  env.Default(libinstall)  env.Default(libinstall)
650  env.Default(incinstall)  env.Default(incinstall)
651  env.Default(pyinstall)  env.Default(pyinstall)
652    ### env.Default(exinstall) # ksteube this causes dependency error
653  env.Alias('release_src',[ src_zipfile, src_tarfile ])  env.Alias('release_src',[ src_zipfile, src_tarfile ])
654  env.Alias('release_tests',[ test_zipfile, test_tarfile])  env.Alias('release_tests',[ test_zipfile, test_tarfile])
655  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])
656    env.Alias('examples_zipfile',examples_zipfile)
657    env.Alias('examples_tarfile',examples_tarfile)
658  env.Alias('api_epydoc',api_epydoc)  env.Alias('api_epydoc',api_epydoc)
659    env.Alias('api_doxygen',api_doxygen)
660    env.Alias('guide_html_index',guide_html_index)
661  env.Alias('guide_pdf', guide_pdf)  env.Alias('guide_pdf', guide_pdf)
662  env.Alias('docs',[ 'release_examples', 'guide_pdf', guide_html_index, api_epydoc])  env.Alias('docs',[ 'release_examples', 'guide_pdf', api_epydoc, api_doxygen, guide_html_index])
663  env.Alias('release', ['release_src', 'release_tests', 'docs'])  env.Alias('release', ['release_src', 'release_tests', 'docs'])
664  env.Alias('build_tests')    # target to build all C++ tests  env.Alias('build_tests')    # target to build all C++ tests
665  env.Alias('build_py_tests') # target to build all python tests  env.Alias('build_py_tests') # target to build all python tests
# Line 551  init_target = env.Command(pyinstall+'/__ Line 673  init_target = env.Command(pyinstall+'/__
673  env.Alias(init_target)  env.Alias(init_target)
674    
675  # Allow sconscripts to see the env  # Allow sconscripts to see the env
676  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs_cxx", "useNetCDF",  Export(["IS_WINDOWS_PLATFORM", "env", "incinstall", "libinstall", "pyinstall", "exinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs", "useNetCDF",
677      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
678          "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",
679          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])          "guide_pdf", "guide_html_index", "api_epydoc", "api_doxygen", "useMPI" ])
680    
681  # End initialisation section  # End initialisation section
682  # Begin configuration section  # Begin configuration section
# Line 563  release_srcfiles=[env.File('SConstruct') Line 685  release_srcfiles=[env.File('SConstruct')
685  release_testfiles=[env.File('README_TESTS'),]  release_testfiles=[env.File('README_TESTS'),]
686  env.Zip(src_zipfile, release_srcfiles)  env.Zip(src_zipfile, release_srcfiles)
687  env.Zip(test_zipfile, release_testfiles)  env.Zip(test_zipfile, release_testfiles)
688  env.Tar(src_tarfile, release_srcfiles)  try:
689  env.Tar(test_tarfile, release_testfiles)     env.Tar(src_tarfile, release_srcfiles)
690       env.Tar(test_tarfile, release_testfiles)
691    except AttributeError:
692       pass
693  # Insert new components to be build here  # Insert new components to be build here
694  # FIXME: might be nice to replace this verbosity with a list of targets and some  # FIXME: might be nice to replace this verbosity with a list of targets and some
695  # FIXME: nifty python to create the lengthy but very similar env.Sconscript lines  # FIXME: nifty python to create the lengthy but very similar env.Sconscript lines

Legend:
Removed from v.1026  
changed lines
  Added in v.1235

  ViewVC Help
Powered by ViewVC 1.1.26