/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1028 by gross, Wed Mar 14 00:15:24 2007 UTC revision 1141 by gross, Tue May 15 04:24:51 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:  #===============================================================
25  if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'):  #   check on windows or linux platform
26     umf_path_default='/opt/UMFPACK/Include'  #
27     umf_lib_path_default='/opt/UMFPACK/Lib'  IS_WINDOWS_PLATFORM = (os.name== "nt")
28     umf_libs_default=['umfpack']  
29  else:  if IS_WINDOWS_PLATFORM:
30     umf_path_default=None     tools_prefix="C:\\Program Files\\"
31     umf_lib_path_default=None  else:
32     umf_libs_default=None     tools_prefix="/usr/local/"
33    
34  if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):  #==============================================================================================    
35     amd_path_default='/opt/AMD/Include'  #    
36     amd_lib_path_default='/opt/AMD/Lib'  #    get the iinstallation prefix
37     amd_libs_default=['amd']  #
38  else:  prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)
39     amd_path_default=None  print "Install prefix is: ", prefix
40     amd_lib_path_default=None  
    amd_libs_default=None  
   
 if os.path.isdir('/opt/UFconfig'):  
    ufc_path_default='/opt/UFconfig'  
 else:  
    ufc_path_default=None  
   
 if os.path.isdir('/usr/local/include') and os.path.isdir('/usr/local/lib'):  
   netCDF_path_default='/usr/local/include'  
   netCDF_lib_path_default='/usr/local/lib'  
   netCDF_libs_cxx_default=[ 'netcdf_c++', 'netcdf']  
 else:  
   netCDF_path_default=None  
   netCDF_lib_path_default=None  
   netCDF_libs_cxx_default=None  
41  # Default options and options help text  # Default options and options help text
42  # 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.
43  # 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
44  # DO NOT CHANGE THEM HERE  # DO NOT CHANGE THEM HERE
45    # Where to install?
46    #==============================================================================================    
47    #    
48    #    get the options file if present:
49    #
50  if ARGUMENTS.get('options_file',0):  if ARGUMENTS.get('options_file',0):
51     options_file = ARGUMENTS.get('options_file',0)     options_file = ARGUMENTS.get('options_file',0)
52  else:  else:
# Line 69  else: Line 57  else:
57           hostname+=s           hostname+=s
58        else:        else:
59           hostname+="_"           hostname+="_"
60     options_file = "scons/"+hostname+"_options.py"     options_file = os.path.join("scons",hostname+"_options.py")
61      
62  if os.path.isfile(options_file):  if os.path.isfile(options_file):
63     print "option file is ",options_file,"."     print "option file is ",options_file,"."
64  else:  else:
65     print "option file is ",options_file, "(not present)."     print "option file is ",options_file, "(not present)."
66    # and load it
67  opts = Options(options_file, ARGUMENTS)  opts = Options(options_file, ARGUMENTS)
68    #================================================================
69    #
70    #   check if UMFPACK is installed on the system:
71    #
72    umf_path_default=None
73    umf_lib_path_default=None
74    umf_libs_default=None
75    if IS_WINDOWS_PLATFORM:
76       pass
77    else:
78       if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'):
79          umf_path_default='/opt/UMFPACK/Include'
80          umf_lib_path_default='/opt/UMFPACK/Lib'
81          umf_libs_default=['umfpack']
82    
83    amd_path_default=None
84    amd_lib_path_default=None
85    amd_libs_default=None
86    if IS_WINDOWS_PLATFORM:
87       pass
88    else:
89       if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):
90          amd_path_default='/opt/AMD/Include'
91          amd_lib_path_default='/opt/AMD/Lib'
92          amd_libs_default=['amd']
93    
94    ufc_path_default=None
95    if IS_WINDOWS_PLATFORM:
96       pass
97    else:
98       if os.path.isdir('/opt/UFconfig'):
99            ufc_path_default='/opt/UFconfig'
100    #==========================================================================
101    #
102    #    python installation:
103    #
104    if IS_WINDOWS_PLATFORM:
105       python_path_default='C:\\Program Files\\python%s%s'%(sys.version_info[0],sys.version_info[1])+"\\include"
106       python_lib_path_default='C:\\Program Files\\python%s%s'%(sys.version_info[0],sys.version_info[1])+"\\libs"
107       python_libs_default=["python%s%s"%(sys.version_info[0],sys.version_info[1])]
108    else:
109       python_path_default='/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])
110       python_lib_path_default='/usr/lib'
111       python_libs_default=["python%s.%s"%(sys.version_info[0],sys.version_info[1])]
112    #==========================================================================
113    #
114    #    boost installation:
115    #
116    if IS_WINDOWS_PLATFORM:
117       boost_libs_path_default='C:\\Program Files\\boost\\lib\\'
118       boost_libs_default=None
119       for i in os.listdir(boost_libs_path_default):
120          name=os.path.splitext(i)
121          if name[1] == ".dll" and name[0].startswith("boost_python"):
122              if boost_libs_default == None:
123             boost_libs_default= [ name[0] ]
124          else:
125             if not name[0].find("-gd-"): boost_libs_default=[ name[0] ]
126       boost_path_default='C:\\Program Files\\boost\\include\\boost-%s'%(boost_libs_default[0].split("-")[-1],)
127    else:
128       boost_path_default='/usr/include'
129       boost_libs_path_default='/usr/lib'
130       boost_libs_default=['boost_python']
131    #==========================================================================
132    #
133    #    check if netCDF is installed on the system:
134    #
135    netCDF_path_default=None
136    netCDF_lib_path_default=None
137    netCDF_libs_default=None
138    useNetCDF_default='no'
139    netcdf_dir=os.path.join(tools_prefix,'netcdf')
140    if os.path.isdir(os.path.join(netcdf_dir,'include')) and os.path.isdir(os.path.join(netcdf_dir,'lib')):
141         netCDF_path_default=os.path.join(netcdf_dir,'include')
142         netCDF_lib_path_default=os.path.join(netcdf_dir,'lib')
143         netCDF_libs_default=['netcdf_cpp',  'netcdf' ]
144         if IS_WINDOWS_PLATFORM:
145            useNetCDF_default='no' # be default netcdf is not supported on windows.
146         else:
147            useNetCDF_default='yes'
148    #==========================================================================
149    #
150    #    compile:
151    #
152    if IS_WINDOWS_PLATFORM:
153        # cc_flags_default  = '/GR /EHsc /MD /Qc99 /Qopenmp /Qopenmp-report1 /O3 /G7 /Qprec /Qpar-report1 /QxP /QaxP'
154        # cc_flags_debug_default  = '/Od /MDd /RTC1 /GR /EHsc /Qc99 /Qopenmp /Qopenmp-report1 /Qprec'
155        cc_flags_default  = '/nologo /EHsc /GR  /wd4068 /O2 /Op /MT /W3 /Ob0 /Z7'
156        cc_flags_debug_default  ='/nologo /EHsc /GR  /wd4068 /Od /RTC1 /MTd /ZI /Ob0 /Z7'
157        
158        cc_flags_default  = '/nologo /EHsc /GR  /O2 /MT /W3 /Ob0 /Z7 /wd4068'
159        cc_flags_debug_default  ='/nologo /EHsc /GR /Od /RTC1 /MTd /W3 /Ob0 /Z7/wd4068'
160        cxx_flags_default = ''
161        cxx_flags_debug_default = ''
162        cc_common_flags = '/FD /EHsc /GR /wd4068 '
163    else:
164       cc_flags_default='-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'
165       cc_flags_debug_default='-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'
166       cxx_flags_default='--no-warn -ansi'
167       cxx_flags_debug_default='--no-warn -ansi -DDOASSERT'
168    #==============================================================================================    
169    # Default options and options help text
170    # These are defaults and can be overridden using command line arguments or an options file.
171    # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used
172    # DO NOT CHANGE THEM HERE
173  opts.AddOptions(  opts.AddOptions(
174  # Where to install esys stuff  # Where to install esys stuff
175    ('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'),    ('incinstall', 'where the esys headers will be installed', prefix+'/include'),
176    ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),    ('libinstall', 'where the esys libraries will be installed', prefix+'/lib'),
177    ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),    ('pyinstall', 'where the esys python modules will be installed', prefix),
178    ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),    ('src_zipfile', 'the source zip file will be installed.', prefix+"/release/escript_src.zip"),
179    ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"),    ('test_zipfile', 'the test zip file will be installed.', prefix+"/release/escript_tests.zip"),
180    ('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.', prefix+"/release/escript_src.tar.gz"),
181    ('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.', prefix+"/release/escript_tests.tar.gz"),
182    ('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.', prefix+"/release/doc/escript_examples.tar.gz"),
183    ('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.', prefix+"/release/doc/escript_examples.zip"),
184    ('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', prefix+"/release/doc/user/guide.pdf"),
185    ('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"),    ('api_epydoc', 'name of the epydoc api docs directory',prefix+"/release/doc/epydoc"),
186    ('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', prefix+"/release/doc/user/html"),
187  # Compilation options  # Compilation options
188    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
189    ('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),
190    ('cc_defines','C/C++ defines to use', None),    ('cc_defines','C/C++ defines to use', None),
191    ('cc_flags','C compiler flags to use (Release build)', '-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'),    ('cc_flags','C compiler flags to use (Release build)', cc_flags_default),
192    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'),    ('cc_flags_debug', 'C compiler flags to use (Debug build)', cc_flags_debug_default),
193    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),
194    ('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'),  
195    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
196    ('sys_libs', 'System libraries to link with', None),    ('sys_libs', 'System libraries to link with', None),
197    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
# Line 128  opts.AddOptions( Line 218  opts.AddOptions(
218    PathOption('blas_lib_path', 'Path to BLAS libs', None),    PathOption('blas_lib_path', 'Path to BLAS libs', None),
219    ('blas_libs', 'BLAS libraries to link with', None),    ('blas_libs', 'BLAS libraries to link with', None),
220  # netCDF  # netCDF
221    ('useNetCDF', 'switch on/off the usage of netCDF', 'yes'),    ('useNetCDF', 'switch on/off the usage of netCDF', useNetCDF_default),
222    PathOption('netCDF_path', 'Path to netCDF includes', netCDF_path_default),    PathOption('netCDF_path', 'Path to netCDF includes', netCDF_path_default),
223    PathOption('netCDF_lib_path', 'Path to netCDF libs', netCDF_lib_path_default),    PathOption('netCDF_lib_path', 'Path to netCDF libs', netCDF_lib_path_default),
224    ('netCDF_libs_cxx', 'netCDF C++ libraries to link with', netCDF_libs_cxx_default),    ('netCDF_libs', 'netCDF C++ libraries to link with', netCDF_libs_default),
225  # Python  # Python
226  # locations of include files for python  # locations of include files for python
227    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),
228    PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'),    PathOption('python_lib_path', 'Path to Python libs', python_lib_path_default),
229    ('python_lib', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]),    ('python_libs', 'Python libraries to link with', python_libs_default),
230  # Boost  # Boost
231    PathOption('boost_path', 'Path to Boost includes', '/usr/include'),    PathOption('boost_path', 'Path to Boost includes', boost_path_default),
232    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),    PathOption('boost_libs_path', 'Path to Boost libs', boost_libs_path_default),
233    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),    ('boost_libs', 'Boost libraries to link with', boost_libs_default),
234  # Doc building  # Doc building
235  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),
236  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),
# Line 151  opts.AddOptions( Line 241  opts.AddOptions(
241  # MPI  # MPI
242    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
243  )  )
244  # Note: On the Altix the intel compilers are not automatically  #=================================================================================================
245  # detected by scons intelc.py script. The Altix has a different directory  #
246  # path and in some locations the "modules" facility is used to support  #   Note: On the Altix the intel compilers are not automatically
247  # multiple compiler versions. This forces the need to import the users PATH  #   detected by scons intelc.py script. The Altix has a different directory
248  # environment which isn't the "scons way"  #   path and in some locations the "modules" facility is used to support
249  # 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
250  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix  #   environment which isn't the "scons way"
251    #   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)
252  if os.name != "nt" and os.uname()[4]=='ia64':  #   FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix
253     env = Environment(tools = ['default', 'intelc'], options = opts)  #
254     if env['CXX'] == 'icpc':  if IS_WINDOWS_PLATFORM:
255        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 = Environment(tools = ['default', 'msvc'], options = opts)
256  elif os.name == "nt":  else:
257     env = Environment(tools = ['default', 'msvc'], options = opts)     if os.uname()[4]=='ia64':
258  else:        env = Environment(tools = ['default', 'intelc'], options = opts)
259     env = Environment(tools = ['default'], options = opts)        if env['CXX'] == 'icpc':
260  # Initialise Scons Build Environment           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
261  # check for user environment variables we are interested in     else:
262          env = Environment(tools = ['default'], options = opts)
263    Help(opts.GenerateHelpText(env))
264    #=================================================================================================
265    #
266    #     Initialise Scons Build Environment
267    #     check for user environment variables we are interested in
268  try:  try:
269     python_path = os.environ['PYTHONPATH']     python_path = os.environ['PYTHONPATH']
270     env['ENV']['PYTHONPATH'] = python_path     env['ENV']['PYTHONPATH'] = python_path
# Line 185  try: Line 281  try:
281     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path
282  except KeyError:  except KeyError:
283     ld_library_path = ''     ld_library_path = ''
284    #==========================================================================
285    #
286  # Setup help for options  #    Add some customer builders
287  Help(opts.GenerateHelpText(env))  #
   
 # Add some customer builders  
288  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)
289  env.Append(BUILDERS = {'PyCompile' : py_builder});  env.Append(BUILDERS = {'PyCompile' : py_builder});
290    
291  if env['PLATFORM'] == "win32":  if IS_WINDOWS_PLATFORM:
292     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)
293  else:  else:
294     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 211  except KeyError: Line 305  except KeyError:
305     incinstall = None     incinstall = None
306  try:  try:
307     libinstall = env['libinstall']     libinstall = env['libinstall']
308     env.Append(LIBPATH = [libinstall,])     env.Append(LIBPATH = [libinstall,]) # ksteube adds -L for building of libescript.so libfinley.so escriptcpp.so finleycpp.so
309     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
310     if env['PLATFORM'] == "win32":     if env['PLATFORM'] == "win32":
311        env.PrependENVPath('PATH', libinstall)        env.PrependENVPath('PATH', libinstall)
312        env.PrependENVPath('PATH', env['boost_lib_path'])        env.PrependENVPath('PATH', env['boost_libs_path'])
313  except KeyError:  except KeyError:
314     libinstall = None     libinstall = None
315  try:  try:
# Line 237  try: Line 331  try:
331  except KeyError:  except KeyError:
332     pass     pass
333    
 if 'shake71' == socket.gethostname().split('.')[0]:  
   if useMPI:  
     env['CC'] = 'mpicc'  
     env['CXX'] = 'mpiCC'  
   
334  if dodebug:  if dodebug:
335    if useMPI:    if useMPI:
336      try:      try:
# Line 302  except KeyError: Line 391  except KeyError:
391  try:  try:
392     sys_libs = env['sys_libs']     sys_libs = env['sys_libs']
393  except KeyError:  except KeyError:
394     sys_libs = ''     sys_libs = []
395    
396  try:  try:
397     tar_flags = env['tar_flags']     tar_flags = env['tar_flags']
# Line 323  except KeyError: Line 412  except KeyError:
412     pass     pass
413    
414  if useMPI:  if useMPI:
415     mkl_libs = ''     mkl_libs = []
416  else:  else:
417     try:     try:
418        mkl_libs = env['mkl_libs']        mkl_libs = env['mkl_libs']
419     except KeyError:     except KeyError:
420        mkl_libs = ''        mkl_libs = []
421    
422  try:  try:
423     includes = env['scsl_path']     includes = env['scsl_path']
# Line 346  if useMPI: Line 435  if useMPI:
435    try:    try:
436      scsl_libs = env['scsl_libs_MPI']      scsl_libs = env['scsl_libs_MPI']
437    except KeyError:    except KeyError:
438      scsl_libs = ''      scsl_libs = []
439  else:  else:
440    try:    try:
441      scsl_libs = env['scsl_libs']      scsl_libs = env['scsl_libs']
442    except KeyError:    except KeyError:
443      scsl_libs = ''      scsl_libs = []
444    
445  try:  try:
446     includes = env['umf_path']     includes = env['umf_path']
# Line 366  except KeyError: Line 455  except KeyError:
455     pass     pass
456    
457  if useMPI:  if useMPI:
458      umf_libs = ''      umf_libs = []
459  else:  else:
460     try:     try:
461        umf_libs = env['umf_libs']        umf_libs = env['umf_libs']
462     except KeyError:     except KeyError:
463        umf_libs = ''        umf_libs = []
464    
465  try:  try:
466     includes = env['ufc_path']     includes = env['ufc_path']
# Line 392  except KeyError: Line 481  except KeyError:
481     pass     pass
482    
483  if useMPI:  if useMPI:
484      amd_libs = ''      amd_libs = []
485  else:  else:
486     try:     try:
487        amd_libs = env['amd_libs']        amd_libs = env['amd_libs']
488     except KeyError:     except KeyError:
489        amd_libs = ''        amd_libs = []
490    
491  try:  try:
492     includes = env['blas_path']     includes = env['blas_path']
# Line 414  except KeyError: Line 503  except KeyError:
503  try:  try:
504     blas_libs = env['blas_libs']     blas_libs = env['blas_libs']
505  except KeyError:  except KeyError:
506     blas_libs = ''     blas_libs = []
507    
508  try:  try:
509     useNetCDF = env['useNetCDF']     useNetCDF = env['useNetCDF']
# Line 434  if useNetCDF == 'yes': Line 523  if useNetCDF == 'yes':
523    
524     try:     try:
525        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
526        env.Append(LIBPATH = [lib_path,])        if IS_WINDOWS_PLATFORM: env['ENV']['PATH']+=";"+lib_path
527          env.Append(LIBPATH = [ lib_path, ])
528     except KeyError:     except KeyError:
529        pass        pass
530    
531     try:     try:
532        netCDF_libs_cxx = env['netCDF_libs_cxx']        netCDF_libs = env['netCDF_libs']
533     except KeyError:     except KeyError:
534        netCDF_libs_cxx = [ ]        netCDF_libs = [ ]
535  else:  else:
536     netCDF_libs_cxx=[ ]     netCDF_libs=[ ]
537    
538  try:  try:
539     includes = env['boost_path']     includes = env['boost_path']
# Line 451  try: Line 541  try:
541  except KeyError:  except KeyError:
542     pass     pass
543  try:  try:
544     lib_path = env['boost_lib_path']     lib_path = env['boost_libs_path']
545     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
546  except KeyError:  except KeyError:
547     pass     pass
548  try:  try:
549     boost_lib = env['boost_lib']     boost_libs = env['boost_libs']
550  except KeyError:  except KeyError:
551     boost_lib = None     boost_libs = None
552  try:  try:
553     includes = env['python_path']     includes = env['python_path']
554     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 470  try: Line 560  try:
560  except KeyError:  except KeyError:
561     pass     pass
562  try:  try:
563     python_lib = env['python_lib']     python_libs = env['python_libs']
564  except KeyError:  except KeyError:
565     python_lib = None     python_libs = None
566  try:  try:
567     doxygen_path = env['doxygen_path']     doxygen_path = env['doxygen_path']
568  except KeyError:  except KeyError:
# Line 539  except KeyError: Line 629  except KeyError:
629     api_epydoc = None     api_epydoc = None
630    
631  # Zipgets  # Zipgets
   
632  env.Default(libinstall)  env.Default(libinstall)
633  env.Default(incinstall)  env.Default(incinstall)
634  env.Default(pyinstall)  env.Default(pyinstall)
# Line 562  init_target = env.Command(pyinstall+'/__ Line 651  init_target = env.Command(pyinstall+'/__
651  env.Alias(init_target)  env.Alias(init_target)
652    
653  # Allow sconscripts to see the env  # Allow sconscripts to see the env
654  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", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs", "useNetCDF",
655      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_libs", "python_libs", "doxygen_path", "epydoc_path", "papi_libs",
656          "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",
657          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI" ])
658    
659  # End initialisation section  # End initialisation section
660  # Begin configuration section  # Begin configuration section
# Line 574  release_srcfiles=[env.File('SConstruct') Line 663  release_srcfiles=[env.File('SConstruct')
663  release_testfiles=[env.File('README_TESTS'),]  release_testfiles=[env.File('README_TESTS'),]
664  env.Zip(src_zipfile, release_srcfiles)  env.Zip(src_zipfile, release_srcfiles)
665  env.Zip(test_zipfile, release_testfiles)  env.Zip(test_zipfile, release_testfiles)
666  env.Tar(src_tarfile, release_srcfiles)  try:
667  env.Tar(test_tarfile, release_testfiles)     env.Tar(src_tarfile, release_srcfiles)
668       env.Tar(test_tarfile, release_testfiles)
669    except AttributeError:
670       pass
671  # Insert new components to be build here  # Insert new components to be build here
672  # 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
673  # 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.1028  
changed lines
  Added in v.1141

  ViewVC Help
Powered by ViewVC 1.1.26