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

Diff of /branches/refine/SConstruct

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

revision 2388 by jfenwick, Wed Apr 15 06:21:25 2009 UTC revision 2391 by jfenwick, Thu Apr 16 01:08:57 2009 UTC
# Line 33  IS_WINDOWS_PLATFORM = (os.name== "nt") Line 33  IS_WINDOWS_PLATFORM = (os.name== "nt")
33    
34  prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)  prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)
35    
36  # Read configuration options from file scons/<hostname>_options.py  #Determine where to read options from use:
37  hostname = re.sub("[^0-9a-zA-Z]", "_", socket.gethostname().split('.')[0])  #1. command line
38  ehostname = scons_extensions.effectiveName(hostname)  #2. scons/<hostname>_options.py
39  tmp = os.path.join("scons",ehostname+"_options.py")  #3. name as part of a cluster
40  options_file = ARGUMENTS.get('options_file', tmp)  options_file=ARGUMENTS.get('options_file', None)
41    if not options_file:
42      hostname = re.sub("[^0-9a-zA-Z]", "_", socket.gethostname().split('.')[0])
43      options_file = os.path.join("scons",hostname+"_options.py")
44      #If there is no options file with that name see if there is a substitute
45      if not os.path.isfile(options_file):
46        tmp = scons_extensions.effectiveName(hostname)
47        options_file = os.path.join("scons",tmp+"_options.py")
48    
49  if not os.path.isfile(options_file):  if not os.path.isfile(options_file):
50      print "Options file not found (expected '%s')" % options_file
51    options_file = False    options_file = False
   print "Options file not found (expected '%s')" % tmp  
52  else:  else:
53    print "Options file is", options_file    print "Options file is", options_file
54    

Legend:
Removed from v.2388  
changed lines
  Added in v.2391

  ViewVC Help
Powered by ViewVC 1.1.26