/[escript]/trunk/scons/esys_options.py
ViewVC logotype

Diff of /trunk/scons/esys_options.py

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

revision 427 by gross, Tue Jan 10 04:24:07 2006 UTC revision 455 by jgs, Tue Jan 24 04:36:54 2006 UTC
# Line 1  Line 1 
1  # this code should be called by all esys13 scons builder and testing scripts  # this code should be called by all esys13 scons builder and testing scripts
2  # it sets default values for relevant variables and overloads them with the  # it sets default values for relevant variables and overloads them with the
3  # standart gcc settings by importing gcc_options. If there is  # standard gcc settings by importing gcc_options. If there is
4  # a <hostname>_options file it is imported to set platform specific settings  # a <hostname>_options file it is imported to set platform specific settings
5    
6  # this is the general set up for the esys scons system:  # this is the general set up for the esys scons system:
# Line 18  scsl_path = '' Line 18  scsl_path = ''
18  scsl_lib_path = ''  scsl_lib_path = ''
19  scsl_libs = []  scsl_libs = []
20    
   
21  # locations of libs etc used by UMFPACK  # locations of libs etc used by UMFPACK
22  umfpack_path = ''  umfpack_path = ''
23  umfpack_lib_path = ''  umfpack_lib_path = ''
24  umfpack_libs = []  umfpack_libs = []
25    
   
26  # locations of include files for python  # locations of include files for python
27  python_path = Dir('/usr/include')  python_path = Dir('/usr/include')
28  python_lib_path =Dir('/usr/lib')  python_lib_path =Dir('/usr/lib')
# Line 54  ar_flags = 'crus' Line 52  ar_flags = 'crus'
52  sys_libs = []  sys_libs = []
53    
54  #==== end of setting options ===========================================  #==== end of setting options ===========================================
55    
56  import sys  import sys
57  # set esys root  
58    # set esysroot
59  options_dir = Dir(esysroot + '/scons')  options_dir = Dir(esysroot + '/scons')
60  if sys.path.count(str(options_dir))==0: sys.path.append(str(options_dir))  if sys.path.count(str(options_dir))==0: sys.path.append(str(options_dir))
61    
62  #  #
63  # ensure correct versions of python and scons  # ensure correct versions of python and scons
64  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
65  EnsureSConsVersion(0,96)  EnsureSConsVersion(0,96)
66  #  
 # import configuration variables passed in from  
 # calling SConscript (if any)  
67  #  #
68  # retreive command-line arguments if any and overwrite settings in <hostname>_options  # retreive command-line arguments if any and overwrite settings in <hostname>_options
69  usegcc = 0  usegcc = 0
# Line 74  if ARGUMENTS.get('pyinstall',0): pyinsta Line 73  if ARGUMENTS.get('pyinstall',0): pyinsta
73  if ARGUMENTS.get('debug',0): dodebug = 1  if ARGUMENTS.get('debug',0): dodebug = 1
74  if ARGUMENTS.get('options',0): options = ARGUMENTS.get('options',0)  if ARGUMENTS.get('options',0): options = ARGUMENTS.get('options',0)
75  if ARGUMENTS.get('usegcc',0): usegcc = 1  if ARGUMENTS.get('usegcc',0): usegcc = 1
76    
77  #  #
78  # try to import <hostname>_options  # try to import <hostname>_options
79  try:  try:
80      exec "from gcc_options import *"      exec "from gcc_options import *"
81  except ImportError:  except ImportError:
82      pass      pass
83    
84  #  #
85  # try to import <hostname>_options  # try to import <hostname>_options
86  if usegcc==0:  if usegcc==0:
# Line 89  if usegcc==0: Line 90  if usegcc==0:
90        exec "from "+hostname+"_options import *"        exec "from "+hostname+"_options import *"
91     except ImportError:     except ImportError:
92        pass        pass
93    
94    #
95  # import additional options:  # import additional options:
96  if options!=None:  if options!=None:
97    exec "from " + options + " import *"    exec "from " + options + " import *"
98    
99  #  #
100  # use debug options:  # use debug options:
101  if dodebug==1:  if dodebug==1:
102       cxx_flags=cxx_flags_debug       cxx_flags=cxx_flags_debug
103       cc_flags=cc_flags_debug       cc_flags=cc_flags_debug
104  #  
 # export some stuff  
105  Export(["esysroot"])  Export(["esysroot"])

Legend:
Removed from v.427  
changed lines
  Added in v.455

  ViewVC Help
Powered by ViewVC 1.1.26