/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1246 by phornby, Mon Aug 13 22:09:00 2007 UTC revision 1250 by ksteube, Thu Aug 16 02:54:42 2007 UTC
# Line 15  EnsurePythonVersion(2,3) Line 15  EnsurePythonVersion(2,3)
15  #===============================================================  #===============================================================
16  #   import tools:  #   import tools:
17  import glob  import glob
18  import sys, os  import sys, os, re
19  # Add our extensions  # Add our extensions
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
# Line 75  if not os.path.isfile(options_file) : Line 75  if not os.path.isfile(options_file) :
75    
76  if not options_file :  if not options_file :
77     import socket     import socket
78     from string import ascii_letters,digits     hostname = re.sub("[^0-9a-zA-Z]", "_", socket.gethostname().split('.')[0])
    hostname=""  
    for s in socket.gethostname().split('.')[0]:  
       if s in ascii_letters+digits:  
          hostname+=s  
       else:  
          hostname+="_"  
79     tmp = os.path.join("scons",hostname+"_options.py")     tmp = os.path.join("scons",hostname+"_options.py")
80    
81     if os.path.isfile(tmp) :     if os.path.isfile(tmp) :
# Line 331  try: Line 325  try:
325     libinstall = env['libinstall']     libinstall = env['libinstall']
326     env.Append(LIBPATH = [libinstall,]) # Adds -L for building of libescript.so libfinley.so escriptcpp.so finleycpp.so     env.Append(LIBPATH = [libinstall,]) # Adds -L for building of libescript.so libfinley.so escriptcpp.so finleycpp.so
327     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
328     if env['PLATFORM'] == "win32":     if IS_WINDOWS_PLATFORM :
329        env.PrependENVPath('PATH', libinstall)        env.PrependENVPath('PATH', libinstall)
       env.PrependENVPath('PATH', env['boost_lib_path'])  
330  except KeyError:  except KeyError:
331     libinstall = None     libinstall = None
332  try:  try:
# Line 567  if useNetCDF == 'yes': Line 560  if useNetCDF == 'yes':
560    
561     try:     try:
562        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
       if IS_WINDOWS_PLATFORM: env['ENV']['PATH']+=";"+lib_path  
563        env.Append(LIBPATH = [ lib_path, ])        env.Append(LIBPATH = [ lib_path, ])
564          if IS_WINDOWS_PLATFORM :
565             env.PrependENVPath('PATH', lib_path)
566     except KeyError:     except KeyError:
567        pass        pass
568  else:  else:
# Line 583  except KeyError: Line 577  except KeyError:
577  try:  try:
578     lib_path = env['boost_lib_path']     lib_path = env['boost_lib_path']
579     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
580       if IS_WINDOWS_PLATFORM :
581          env.PrependENVPath('PATH', lib_path)
582  except KeyError:  except KeyError:
583     pass     pass
584  try:  try:
# Line 673  try: Line 669  try:
669  except KeyError:  except KeyError:
670     api_doxygen = None     api_doxygen = None
671    
672    try:
673       svn_pipe = os.popen("svnversion -n")
674       global_revision = svn_pipe.readlines()
675       svn_pipe.close()
676       global_revision = re.sub("[^0-9]", "", global_revision)
677    except:
678       global_revision = "0"
679    env.Append(CPPDEFINES = "SVN_VERSION="+global_revision[0])
680    
681  # Python install - esys __init__.py  # Python install - esys __init__.py
682  init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))  init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))
683    

Legend:
Removed from v.1246  
changed lines
  Added in v.1250

  ViewVC Help
Powered by ViewVC 1.1.26