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

Diff of /branches/refine/SConstruct

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

revision 1360 by ksteube, Thu Dec 13 05:05:00 2007 UTC revision 1428 by trankine, Wed Feb 27 08:07:11 2008 UTC
# Line 20  import sys, os, re Line 20  import sys, os, re
20  if sys.path.count('scons')==0: sys.path.append('scons')  if sys.path.count('scons')==0: sys.path.append('scons')
21  import scons_extensions  import scons_extensions
22    
23    # We may also need to know where python's site-packages subdirectory lives
24    python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
25    
26  #===============================================================  #===============================================================
27    
28  tools_prefix="/usr"  tools_prefix="/usr"
# Line 28  tools_prefix="/usr" Line 31  tools_prefix="/usr"
31  #      #    
32  #    get the installation prefix  #    get the installation prefix
33  #  #
34  prefix = ARGUMENTS.get('prefix', '/usr')  prefix = ARGUMENTS.get('prefix', sys.prefix )
35    
36  # We may also need to know where python's site-packages subdirectory lives  # We may also need to know where python's site-packages subdirectory lives
37  python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])  python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
   
38  # Install as a standard python package in /usr/lib64 if available, else in /usr/lib  # 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"):  if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):
40     sys_dir_packages =  prefix+"/lib64/"+python_version+"/site-packages/esys"     sys_dir_packages =  prefix+"/lib64/"+python_version+"/site-packages/esys"
# Line 289  opts.AddOptions( Line 291  opts.AddOptions(
291    
292  if IS_WINDOWS_PLATFORM:  if IS_WINDOWS_PLATFORM:
293        env = Environment(tools = ['default', 'msvc'], options = opts)        env = Environment(tools = ['default', 'msvc'], options = opts)
294          #env = Environment(tools = ['default', 'intelc'], options = opts)
295  else:  else:
296     if os.uname()[4]=='ia64':     if os.uname()[4]=='ia64':
297        env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
# Line 349  except KeyError: Line 352  except KeyError:
352    
353  try:  try:
354     tmp = os.environ['LD_LIBRARY_PATH']     tmp = os.environ['LD_LIBRARY_PATH']
355       print tmp
356     env['ENV']['LD_LIBRARY_PATH'] = tmp     env['ENV']['LD_LIBRARY_PATH'] = tmp
357  except KeyError:  except KeyError:
358     pass     pass
# Line 449  except KeyError: Line 453  except KeyError:
453     useMPI = None     useMPI = None
454  # ========= set compiler flags ===========================================  # ========= set compiler flags ===========================================
455    
 # Can't use MPI and OpenMP simultaneously at this time  
 if useMPI:  
     omp_flags=''  
     omp_flags_debug=''  
   
456  if dodebug:  if dodebug:
457      try:      try:
458        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug
# Line 502  if not useMPI: Line 501  if not useMPI:
501     try:     try:
502        lib_path = env['mkl_lib_path']        lib_path = env['mkl_lib_path']
503        env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
504          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
505     except KeyError:     except KeyError:
506        pass        pass
507    
# Line 523  if not useMPI: Line 523  if not useMPI:
523     try:     try:
524        lib_path = env['scsl_lib_path']        lib_path = env['scsl_lib_path']
525        env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
526          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
527     except KeyError:     except KeyError:
528        pass        pass
529        
# Line 664  if useNetCDF == 'yes': Line 665  if useNetCDF == 'yes':
665     try:     try:
666        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
667        env.Append(LIBPATH = [ lib_path, ])        env.Append(LIBPATH = [ lib_path, ])
668          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
669        if IS_WINDOWS_PLATFORM :        if IS_WINDOWS_PLATFORM :
670           env.PrependENVPath('PATH', lib_path)           env.PrependENVPath('PATH', lib_path)
671     except KeyError:     except KeyError:
# Line 681  except KeyError: Line 683  except KeyError:
683  try:  try:
684     lib_path = env['boost_lib_path']     lib_path = env['boost_lib_path']
685     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
686       env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
687     if IS_WINDOWS_PLATFORM :     if IS_WINDOWS_PLATFORM :
688        env.PrependENVPath('PATH', lib_path)        env.PrependENVPath('PATH', lib_path)
689  except KeyError:  except KeyError:
# Line 697  except KeyError: Line 700  except KeyError:
700     pass     pass
701  try:  try:
702     lib_path = env['python_lib_path']     lib_path = env['python_lib_path']
703       env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
704     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
705  except KeyError:  except KeyError:
706     pass     pass
# Line 843  try: Line 847  try:
847     global_revision = re.sub(":.*", "", global_revision[0])     global_revision = re.sub(":.*", "", global_revision[0])
848     global_revision = re.sub("[^0-9]", "", global_revision)     global_revision = re.sub("[^0-9]", "", global_revision)
849  except:  except:
850     global_revision = "0"     global_revision="-1"
851       print "Warning: unable to recover global revsion number."
852    if global_revision == "": global_revision="0"
853    print "Revision number is %s."%global_revision
854  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)
855    
856  # Python install - esys __init__.py  # Python install - esys __init__.py

Legend:
Removed from v.1360  
changed lines
  Added in v.1428

  ViewVC Help
Powered by ViewVC 1.1.26