/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1083 by ksteube, Thu Apr 12 01:15:01 2007 UTC revision 1164 by jongui, Thu May 24 00:38:40 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")
    umf_libs_default=['umfpack']  
 else:  
    umf_path_default=None  
    umf_lib_path_default=None  
    umf_libs_default=None  
28    
29  if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):  if IS_WINDOWS_PLATFORM:
30     amd_path_default='/opt/AMD/Include'     tools_prefix="C:\\Program Files\\"
    amd_lib_path_default='/opt/AMD/Lib'  
    amd_libs_default=['amd']  
31  else:  else:
32     amd_path_default=None     tools_prefix="/usr"
    amd_lib_path_default=None  
    amd_libs_default=None  
33    
34  if os.path.isdir('/opt/UFconfig'):  #==============================================================================================    
35     ufc_path_default='/opt/UFconfig'  #    
36  else:  #    get the iinstallation prefix
37     ufc_path_default=None  #
38    prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)
39    print "Install prefix is: ", prefix
40    
 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?  # Where to install?
46  prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)  #==============================================================================================    
47  print "Install prefix is: ", prefix  #    
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 74  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    uf_root=None
73    for i in [ 'UMFPACK', 'umfpack', 'ufsparse', 'UFSPARSE']:
74       if os.path.isdir(os.path.join(tools_prefix,'include',i)):
75           uf_root=i
76           print i," is used form ",tools_prefix
77           break
78    if not uf_root==None:
79       umf_path_default=os.path.join(tools_prefix,'include',uf_root)
80       umf_lib_path_default=os.path.join(tools_prefix,'lib')
81       umf_libs_default=['umfpack']
82       amd_path_default=os.path.join(tools_prefix,'include',uf_root)
83       amd_lib_path_default=os.path.join(tools_prefix,'lib')
84       amd_libs_default=['amd']
85       ufc_path_default=os.path.join(tools_prefix,'include',uf_root)
86    else:
87       umf_path_default=None
88       umf_lib_path_default=None
89       umf_libs_default=None
90       amd_path_default=None
91       amd_lib_path_default=None
92       amd_libs_default=None
93       ufc_path_default=None
94    #
95    #==========================================================================
96    #
97    #    python installation:
98    #
99    if IS_WINDOWS_PLATFORM:
100       python_path_default=os.path.join(tools_prefix,'python%s%s'%(sys.version_info[0],sys.version_info[1]),"include")
101       python_lib_path_default=os.path.join(tools_prefix,'python%s%s'%(sys.version_info[0],sys.version_info[1])+"libs")
102       python_libs_default=["python%s%s"%(sys.version_info[0],sys.version_info[1])]
103    else:
104       python_path_default=os.path.join(tools_prefix,'include','python%s.%s'%(sys.version_info[0],sys.version_info[1]))
105       python_lib_path_default=os.path.join(tools_prefix,'lib')
106       python_libs_default=["python%s.%s"%(sys.version_info[0],sys.version_info[1])]
107    
108    #==========================================================================
109    #
110    #    boost installation:
111    #
112    if IS_WINDOWS_PLATFORM:
113       boost_libs_path_default=os.path.join(tools_prefix,'boost','lib')
114       boost_libs_default=None
115       for i in os.listdir(boost_libs_path_default):
116          name=os.path.splitext(i)
117          if name[1] == ".dll" and name[0].startswith("boost_python"):
118              if boost_libs_default == None:
119             boost_libs_default= [ name[0] ]
120          else:
121             if not name[0].find("-gd-"): boost_libs_default=[ name[0] ]
122       boost_path_default=os.path.join(tools_prefix,'boost','include','boost-%s'%(boost_libs_default[0].split("-")[-1],))
123    else:
124       boost_path_default=os.path.join(tools_prefix,'include')
125       boost_libs_path_default=os.path.join(tools_prefix,'lib')
126       boost_libs_default=['boost_python']
127    #==========================================================================
128    #
129    #    check if netCDF is installed on the system:
130    #
131    if IS_WINDOWS_PLATFORM:
132        netcdf_dir=os.path.join(tools_prefix,'netcdf')
133        netCDF_path_default=os.path.join(netcdf_dir,'include')
134        netCDF_lib_path_default=os.path.join(netcdf_dir,'lib')
135    else:
136        netCDF_path_default=os.path.join(tools_prefix,'include','netcdf-3')
137        netCDF_lib_path_default=os.path.join(tools_prefix,'lib','netcdf-3')
138    
139    if os.path.isdir(netCDF_path_default) and os.path.isdir(netCDF_lib_path_default):
140         useNetCDF_default='yes'
141         netCDF_libs_default=[ 'netcdf_c++', 'netcdf' ]
142    else:
143         useNetCDF_default='no'
144         netCDF_path_default=None
145         netCDF_lib_path_default=None
146         netCDF_libs_default=None
147    
148    if IS_WINDOWS_PLATFORM:
149            useNetCDF_default='no' # be default netcdf is not supported on windows.
150    #==========================================================================
151    #
152    #    compile:
153    #
154    if IS_WINDOWS_PLATFORM:
155        # cc_flags_default  = '/GR /EHsc /MD /Qc99 /Qopenmp /Qopenmp-report1 /O3 /G7 /Qprec /Qpar-report1 /QxP /QaxP'
156        # cc_flags_debug_default  = '/Od /MDd /RTC1 /GR /EHsc /Qc99 /Qopenmp /Qopenmp-report1 /Qprec'
157        cc_flags_default  = '/nologo /EHsc /GR  /wd4068 /O2 /Op /MT /W3 /Ob0 /Z7'
158        cc_flags_debug_default  ='/nologo /EHsc /GR  /wd4068 /Od /RTC1 /MTd /ZI /Ob0 /Z7'
159        
160        cc_flags_default  = '/nologo /EHsc /GR  /O2 /MT /W3 /Ob0 /Z7 /wd4068'
161        cc_flags_debug_default  ='/nologo /EHsc /GR /Od /RTC1 /MTd /W3 /Ob0 /Z7/wd4068'
162        cxx_flags_default = ''
163        cxx_flags_debug_default = ''
164        cc_common_flags = '/FD /EHsc /GR /wd4068 '
165    else:
166       cc_flags_default='-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'
167       cc_flags_debug_default='-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'
168       cxx_flags_default='--no-warn -ansi'
169       cxx_flags_debug_default='--no-warn -ansi -DDOASSERT'
170    #==============================================================================================    
171    # Default options and options help text
172    # These are defaults and can be overridden using command line arguments or an options file.
173    # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used
174    # DO NOT CHANGE THEM HERE
175  opts.AddOptions(  opts.AddOptions(
176  # Where to install esys stuff  # Where to install esys stuff
177    ('incinstall', 'where the esys headers will be installed', prefix+'/include'),    ('incinstall', 'where the esys headers will be installed', prefix+'/include'),
# Line 97  opts.AddOptions( Line 188  opts.AddOptions(
188    ('guide_html', 'name of the directory for user guide in html format', prefix+"/release/doc/user/html"),    ('guide_html', 'name of the directory for user guide in html format', prefix+"/release/doc/user/html"),
189  # Compilation options  # Compilation options
190    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
191    ('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),
192    ('cc_defines','C/C++ defines to use', None),    ('cc_defines','C/C++ defines to use', None),
193    ('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),
194    ('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),
195    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),
196    ('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'),  
197    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
198    ('sys_libs', 'System libraries to link with', None),    ('sys_libs', 'System libraries to link with', None),
199    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
# Line 133  opts.AddOptions( Line 220  opts.AddOptions(
220    PathOption('blas_lib_path', 'Path to BLAS libs', None),    PathOption('blas_lib_path', 'Path to BLAS libs', None),
221    ('blas_libs', 'BLAS libraries to link with', None),    ('blas_libs', 'BLAS libraries to link with', None),
222  # netCDF  # netCDF
223    ('useNetCDF', 'switch on/off the usage of netCDF', 'yes'),    ('useNetCDF', 'switch on/off the usage of netCDF', useNetCDF_default),
224    PathOption('netCDF_path', 'Path to netCDF includes', netCDF_path_default),    PathOption('netCDF_path', 'Path to netCDF includes', netCDF_path_default),
225    PathOption('netCDF_lib_path', 'Path to netCDF libs', netCDF_lib_path_default),    PathOption('netCDF_lib_path', 'Path to netCDF libs', netCDF_lib_path_default),
226    ('netCDF_libs_cxx', 'netCDF C++ libraries to link with', netCDF_libs_cxx_default),    ('netCDF_libs', 'netCDF C++ libraries to link with', netCDF_libs_default),
227  # Python  # Python
228  # locations of include files for python  # locations of include files for python
229    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),
230    PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'),    PathOption('python_lib_path', 'Path to Python libs', python_lib_path_default),
231    ('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),
232  # Boost  # Boost
233    PathOption('boost_path', 'Path to Boost includes', '/usr/include'),    PathOption('boost_path', 'Path to Boost includes', boost_path_default),
234    PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),    PathOption('boost_libs_path', 'Path to Boost libs', boost_libs_path_default),
235    ('boost_lib', 'Boost libraries to link with', ['boost_python',]),    ('boost_libs', 'Boost libraries to link with', boost_libs_default),
236  # Doc building  # Doc building
237  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),  #  PathOption('doxygen_path', 'Path to Doxygen executable', None),
238  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),  #  PathOption('epydoc_path', 'Path to Epydoc executable', None),
# Line 156  opts.AddOptions( Line 243  opts.AddOptions(
243  # MPI  # MPI
244    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
245  )  )
246  # Note: On the Altix the intel compilers are not automatically  #=================================================================================================
247  # detected by scons intelc.py script. The Altix has a different directory  #
248  # path and in some locations the "modules" facility is used to support  #   Note: On the Altix the intel compilers are not automatically
249  # multiple compiler versions. This forces the need to import the users PATH  #   detected by scons intelc.py script. The Altix has a different directory
250  # environment which isn't the "scons way"  #   path and in some locations the "modules" facility is used to support
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)  #   multiple compiler versions. This forces the need to import the users PATH
252  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix  #   environment which isn't the "scons way"
253    #   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)
254  if os.name != "nt" and os.uname()[4]=='ia64':  #   FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix
255     env = Environment(tools = ['default', 'intelc'], options = opts)  #
256     if env['CXX'] == 'icpc':  if IS_WINDOWS_PLATFORM:
257        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)
258  elif os.name == "nt":  else:
259     env = Environment(tools = ['default', 'msvc'], options = opts)     if os.uname()[4]=='ia64':
260     #env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
261  else:        if env['CXX'] == 'icpc':
262     env = Environment(tools = ['default'], options = opts)           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
263  # Initialise Scons Build Environment     else:
264  # check for user environment variables we are interested in        env = Environment(tools = ['default'], options = opts)
265    Help(opts.GenerateHelpText(env))
266    #=================================================================================================
267    #
268    #     Initialise Scons Build Environment
269    #     check for user environment variables we are interested in
270  try:  try:
271     python_path = os.environ['PYTHONPATH']     python_path = os.environ['PYTHONPATH']
272     env['ENV']['PYTHONPATH'] = python_path     env['ENV']['PYTHONPATH'] = python_path
# Line 182  except KeyError: Line 274  except KeyError:
274     python_path = ''     python_path = ''
275    
276  try:  try:
277       omp_num_threads = os.environ['OMP_NUM_THREADS']
278    except KeyError:
279       omp_num_threads = 1
280    env['ENV']['OMP_NUM_THREADS'] = omp_num_threads
281    
282    try:
283       env['ENV']['DISPLAY'] = os.environ['DISPLAY']
284       env['ENV']['XAUTHORITY'] = os.environ['XAUTHORITY']
285    except KeyError:
286       pass
287    
288    try:
289     path = os.environ['PATH']     path = os.environ['PATH']
290     env['ENV']['PATH'] = path     env['ENV']['PATH'] = path
291  except KeyError:  except KeyError:
# Line 191  try: Line 295  try:
295     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path
296  except KeyError:  except KeyError:
297     ld_library_path = ''     ld_library_path = ''
298    #==========================================================================
299    #
300  # Setup help for options  #    Add some customer builders
301  Help(opts.GenerateHelpText(env))  #
   
 # Add some customer builders  
302  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)
303  env.Append(BUILDERS = {'PyCompile' : py_builder});  env.Append(BUILDERS = {'PyCompile' : py_builder});
304    
305  if env['PLATFORM'] == "win32":  if IS_WINDOWS_PLATFORM:
306     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)
307  else:  else:
308     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 221  try: Line 323  try:
323     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
324     if env['PLATFORM'] == "win32":     if env['PLATFORM'] == "win32":
325        env.PrependENVPath('PATH', libinstall)        env.PrependENVPath('PATH', libinstall)
326        env.PrependENVPath('PATH', env['boost_lib_path'])        env.PrependENVPath('PATH', env['boost_libs_path'])
327  except KeyError:  except KeyError:
328     libinstall = None     libinstall = None
329  try:  try:
# Line 243  try: Line 345  try:
345  except KeyError:  except KeyError:
346     pass     pass
347    
 if 'shake71' == socket.gethostname().split('.')[0]:  
   if useMPI:  
     env['CC'] = 'mpicc'  
     env['CXX'] = 'mpiCC'  
   
348  if dodebug:  if dodebug:
349    if useMPI:    if useMPI:
350      try:      try:
# Line 308  except KeyError: Line 405  except KeyError:
405  try:  try:
406     sys_libs = env['sys_libs']     sys_libs = env['sys_libs']
407  except KeyError:  except KeyError:
408     sys_libs = ''     sys_libs = []
409    
410  try:  try:
411     tar_flags = env['tar_flags']     tar_flags = env['tar_flags']
# Line 329  except KeyError: Line 426  except KeyError:
426     pass     pass
427    
428  if useMPI:  if useMPI:
429     mkl_libs = ''     mkl_libs = []
430  else:  else:
431     try:     try:
432        mkl_libs = env['mkl_libs']        mkl_libs = env['mkl_libs']
433     except KeyError:     except KeyError:
434        mkl_libs = ''        mkl_libs = []
435    
436  try:  try:
437     includes = env['scsl_path']     includes = env['scsl_path']
# Line 352  if useMPI: Line 449  if useMPI:
449    try:    try:
450      scsl_libs = env['scsl_libs_MPI']      scsl_libs = env['scsl_libs_MPI']
451    except KeyError:    except KeyError:
452      scsl_libs = ''      scsl_libs = []
453  else:  else:
454    try:    try:
455      scsl_libs = env['scsl_libs']      scsl_libs = env['scsl_libs']
456    except KeyError:    except KeyError:
457      scsl_libs = ''      scsl_libs = []
458    
459  try:  try:
460     includes = env['umf_path']     includes = env['umf_path']
# Line 372  except KeyError: Line 469  except KeyError:
469     pass     pass
470    
471  if useMPI:  if useMPI:
472      umf_libs = ''      umf_libs = []
473  else:  else:
474     try:     try:
475        umf_libs = env['umf_libs']        umf_libs = env['umf_libs']
476     except KeyError:     except KeyError:
477        umf_libs = ''        umf_libs = []
478    
479  try:  try:
480     includes = env['ufc_path']     includes = env['ufc_path']
# Line 398  except KeyError: Line 495  except KeyError:
495     pass     pass
496    
497  if useMPI:  if useMPI:
498      amd_libs = ''      amd_libs = []
499  else:  else:
500     try:     try:
501        amd_libs = env['amd_libs']        amd_libs = env['amd_libs']
502     except KeyError:     except KeyError:
503        amd_libs = ''        amd_libs = []
504    
505  try:  try:
506     includes = env['blas_path']     includes = env['blas_path']
# Line 420  except KeyError: Line 517  except KeyError:
517  try:  try:
518     blas_libs = env['blas_libs']     blas_libs = env['blas_libs']
519  except KeyError:  except KeyError:
520     blas_libs = ''     blas_libs = []
521    
522  try:  try:
523     useNetCDF = env['useNetCDF']     useNetCDF = env['useNetCDF']
# Line 440  if useNetCDF == 'yes': Line 537  if useNetCDF == 'yes':
537    
538     try:     try:
539        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
540        env.Append(LIBPATH = [lib_path,])        if IS_WINDOWS_PLATFORM: env['ENV']['PATH']+=";"+lib_path
541          env.Append(LIBPATH = [ lib_path, ])
542     except KeyError:     except KeyError:
543        pass        pass
544    
545     try:     try:
546        netCDF_libs_cxx = env['netCDF_libs_cxx']        netCDF_libs = env['netCDF_libs']
547     except KeyError:     except KeyError:
548        netCDF_libs_cxx = [ ]        netCDF_libs = [ ]
549  else:  else:
550     netCDF_libs_cxx=[ ]     netCDF_libs=[ ]
551    
552  try:  try:
553     includes = env['boost_path']     includes = env['boost_path']
# Line 457  try: Line 555  try:
555  except KeyError:  except KeyError:
556     pass     pass
557  try:  try:
558     lib_path = env['boost_lib_path']     lib_path = env['boost_libs_path']
559     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
560  except KeyError:  except KeyError:
561     pass     pass
562  try:  try:
563     boost_lib = env['boost_lib']     boost_libs = env['boost_libs']
564  except KeyError:  except KeyError:
565     boost_lib = None     boost_libs = None
566  try:  try:
567     includes = env['python_path']     includes = env['python_path']
568     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 476  try: Line 574  try:
574  except KeyError:  except KeyError:
575     pass     pass
576  try:  try:
577     python_lib = env['python_lib']     python_libs = env['python_libs']
578  except KeyError:  except KeyError:
579     python_lib = None     python_libs = None
580  try:  try:
581     doxygen_path = env['doxygen_path']     doxygen_path = env['doxygen_path']
582  except KeyError:  except KeyError:
# Line 545  except KeyError: Line 643  except KeyError:
643     api_epydoc = None     api_epydoc = None
644    
645  # Zipgets  # Zipgets
   
646  env.Default(libinstall)  env.Default(libinstall)
647  env.Default(incinstall)  env.Default(incinstall)
648  env.Default(pyinstall)  env.Default(pyinstall)
# Line 568  init_target = env.Command(pyinstall+'/__ Line 665  init_target = env.Command(pyinstall+'/__
665  env.Alias(init_target)  env.Alias(init_target)
666    
667  # Allow sconscripts to see the env  # Allow sconscripts to see the env
668  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",
669      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_libs", "python_libs", "doxygen_path", "epydoc_path", "papi_libs",
670          "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",
671          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI" ])
672    
673  # End initialisation section  # End initialisation section
674  # Begin configuration section  # Begin configuration section
# Line 580  release_srcfiles=[env.File('SConstruct') Line 677  release_srcfiles=[env.File('SConstruct')
677  release_testfiles=[env.File('README_TESTS'),]  release_testfiles=[env.File('README_TESTS'),]
678  env.Zip(src_zipfile, release_srcfiles)  env.Zip(src_zipfile, release_srcfiles)
679  env.Zip(test_zipfile, release_testfiles)  env.Zip(test_zipfile, release_testfiles)
680  env.Tar(src_tarfile, release_srcfiles)  try:
681  env.Tar(test_tarfile, release_testfiles)     env.Tar(src_tarfile, release_srcfiles)
682       env.Tar(test_tarfile, release_testfiles)
683    except AttributeError:
684       pass
685  # Insert new components to be build here  # Insert new components to be build here
686  # 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
687  # 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.1083  
changed lines
  Added in v.1164

  ViewVC Help
Powered by ViewVC 1.1.26