/[escript]/branches/windows_from_1456_trunk_1574_merged_in/SConstruct
ViewVC logotype

Diff of /branches/windows_from_1456_trunk_1574_merged_in/SConstruct

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

revision 863 by matt, Wed Oct 4 01:01:15 2006 UTC revision 1024 by gross, Tue Mar 13 06:31:50 2007 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
# Line 62  else: Line 62  else:
62        else:        else:
63           hostname+="_"           hostname+="_"
64     options_file = "scons/"+hostname+"_options.py"     options_file = "scons/"+hostname+"_options.py"
65    print "option file is ",options_file
66    
67  opts = Options(options_file, ARGUMENTS)  opts = Options(options_file, ARGUMENTS)
68  opts.AddOptions(  opts.AddOptions(
# Line 115  opts.AddOptions( Line 116  opts.AddOptions(
116    PathOption('blas_path', 'Path to BLAS includes', None),    PathOption('blas_path', 'Path to BLAS includes', None),
117    PathOption('blas_lib_path', 'Path to BLAS libs', None),    PathOption('blas_lib_path', 'Path to BLAS libs', None),
118    ('blas_libs', 'BLAS libraries to link with', None),    ('blas_libs', 'BLAS libraries to link with', None),
119    # netCDF
120      ('useNetCDF', 'switch on/off the usage of netCDF', 'yes'),
121      PathOption('netCDF_path', 'Path to netCDF includes', '/usr/local/include'),
122      PathOption('netCDF_lib_path', 'Path to netCDF libs', '/usr/local/lib'),
123      ('netCDF_libs_cxx', 'netCDF C++ libraries to link with', [ 'netcdf_c++', 'netcdf'] ),
124  # Python  # Python
125  # locations of include files for python  # locations of include files for python
126    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])),
# Line 134  opts.AddOptions( Line 140  opts.AddOptions(
140  # MPI  # MPI
141    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
142  )  )
   
 # Initialise Scons Build Environment  
 # check for user environment variables we are interested in  
 try:  
    python_path = os.environ['PYTHONPATH']  
 except KeyError:  
    python_path = ''  
 try:  
    path = os.environ['PATH']  
 except KeyError:  
    path = ''  
 try:  
    ld_library_path = os.environ['LD_LIBRARY_PATH']  
 except KeyError:  
    ld_library_path = ''  
   
143  # Note: On the Altix the intel compilers are not automatically  # Note: On the Altix the intel compilers are not automatically
144  # detected by scons intelc.py script. The Altix has a different directory  # detected by scons intelc.py script. The Altix has a different directory
145  # path and in some locations the "modules" facility is used to support  # path and in some locations the "modules" facility is used to support
# Line 160  except KeyError: Line 150  except KeyError:
150    
151  if os.name != "nt" and os.uname()[4]=='ia64':  if os.name != "nt" and os.uname()[4]=='ia64':
152     env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts)     env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts)
    env['ENV']['PATH'] = path  
    env['ENV']['LD_LIBRARY_PATH'] = ld_library_path  
    env['ENV']['PYTHONPATH'] = python_path  
153     if env['CXX'] == 'icpc':     if env['CXX'] == 'icpc':
154        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
155  elif os.name == "nt":  elif os.name == "nt":
156     env = Environment(tools = ['default', 'intelc'], options = opts)     env = Environment(tools = ['default', 'intelc'], options = opts)
    env['ENV']['PYTHONPATH'] = python_path  
157  else:  else:
158     env = Environment(tools = ['default'], options = opts)     env = Environment(tools = ['default'], options = opts)
159    # Initialise Scons Build Environment
160    # check for user environment variables we are interested in
161    try:
162       python_path = os.environ['PYTHONPATH']
163       env['ENV']['PYTHONPATH'] = python_path
164    except KeyError:
165       python_path = ''
166    
167    try:
168       path = os.environ['PATH']
169     env['ENV']['PATH'] = path     env['ENV']['PATH'] = path
170    except KeyError:
171       path = ''
172    try:
173       ld_library_path = os.environ['LD_LIBRARY_PATH']
174     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path
175     env['ENV']['PYTHONPATH'] = python_path  except KeyError:
176       ld_library_path = ''
177    
178    
179  # Setup help for options  # Setup help for options
180  Help(opts.GenerateHelpText(env))  Help(opts.GenerateHelpText(env))
# Line 404  except KeyError: Line 406  except KeyError:
406     blas_libs = ''     blas_libs = ''
407    
408  try:  try:
409       useNetCDF = env['useNetCDF']
410    except KeyError:
411       useNetCDF = 'yes'
412       pass
413    
414    if not useNetCDF == 'yes':
415       print "Warning: Installation is not configured with netCDF. Some I/O function may not be available."
416      
417    if useNetCDF == 'yes':
418       try:
419          includes = env['netCDF_path']
420          env.Append(CPPPATH = [includes,])
421       except KeyError:
422          pass
423    
424       try:
425          lib_path = env['netCDF_lib_path']
426          env.Append(LIBPATH = [lib_path,])
427       except KeyError:
428          pass
429    
430       try:
431          netCDF_libs_cxx = env['netCDF_libs_cxx']
432       except KeyError:
433          netCDF_libs_cxx = [ ]
434    else:
435       netCDF_libs_cxx=[ ]
436    
437    try:
438     includes = env['boost_path']     includes = env['boost_path']
439     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
440  except KeyError:  except KeyError:
# Line 520  init_target = env.Command(pyinstall+'/__ Line 551  init_target = env.Command(pyinstall+'/__
551  env.Alias(init_target)  env.Alias(init_target)
552    
553  # Allow sconscripts to see the env  # Allow sconscripts to see the env
554  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs",  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs_cxx", "useNetCDF",
555      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
556          "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",
557          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])
# Line 542  env.Tar(test_tarfile, release_testfiles) Line 573  env.Tar(test_tarfile, release_testfiles)
573  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)
574  # C/C++ Libraries  # C/C++ Libraries
575  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)
576  env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0)  # bruce is removed for now as it doesn't really do anything
577    # env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0)
578  env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)  env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)
579  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
580  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)
581  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)
582  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)
583  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)
584    env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)
585    
586  # added by Ben Cumming  # added by Ben Cumming
587  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)

Legend:
Removed from v.863  
changed lines
  Added in v.1024

  ViewVC Help
Powered by ViewVC 1.1.26