(file) Return to localize.py CVS log (file) (dir) Up to [Development] / JSOC

Diff for /JSOC/localize.py between version 1.9 and 1.11

version 1.9, 2013/11/15 17:05:49 version 1.11, 2013/11/19 23:41:02
Line 371  def parseConfig(fin, keymap, addenda, de
Line 371  def parseConfig(fin, keymap, addenda, de
         regexpCustMkBeg = re.compile(r"^_CUST_")         regexpCustMkBeg = re.compile(r"^_CUST_")
         regexpCustMkEnd = re.compile(r"^_ENDCUST_")         regexpCustMkEnd = re.compile(r"^_ENDCUST_")
         regexpDiv = re.compile(r"^__")         regexpDiv = re.compile(r"^__")
         regexp = re.compile(r"^\s*(\S+)\s+(\S+)")          regexp = re.compile(r"^\s*(\S+)\s+(\S.*)")
  
         platDict = {}         platDict = {}
         machDict = {}         machDict = {}
Line 396  def parseConfig(fin, keymap, addenda, de
Line 396  def parseConfig(fin, keymap, addenda, de
                     section = newSection                     section = newSection
  
                 if section == 'make':                 if section == 'make':
   
                     # There are some blocks of lines in the __MAKE__ section that must be copied ver batim to the output make file.                     # There are some blocks of lines in the __MAKE__ section that must be copied ver batim to the output make file.
                     # The blocks are defined by _CUST_/_ENDCUST_ tags.                     # The blocks are defined by _CUST_/_ENDCUST_ tags.
                     matchobj = regexpCustMkBeg.match(line)                     matchobj = regexpCustMkBeg.match(line)
Line 417  def parseConfig(fin, keymap, addenda, de
Line 418  def parseConfig(fin, keymap, addenda, de
                     ppRet = processParam(iscfg, line, regexpQuote, regexp, keymap, defs, cDefs, mDefsGen, mDefsMake, perlConstSection, perlInitSection, platDict, machDict, section)                     ppRet = processParam(iscfg, line, regexpQuote, regexp, keymap, defs, cDefs, mDefsGen, mDefsMake, perlConstSection, perlInitSection, platDict, machDict, section)
  
                     if ppRet:                     if ppRet:
                         break;                          break
                 elif section == 'projcfg':                 elif section == 'projcfg':
                     # Copy the line ver batim to the projCfg list (configure)                     # Copy the line ver batim to the projCfg list (configure)
                     for line in fin:                     for line in fin:
Line 513  def parseConfig(fin, keymap, addenda, de
Line 514  def parseConfig(fin, keymap, addenda, de
             for var in machDict[mach]:             for var in machDict[mach]:
                 mDefsMake.extend(list('\n' + var + ' = ' + machDict[mach][var]))                 mDefsMake.extend(list('\n' + var + ' = ' + machDict[mach][var]))
             mDefsMake.extend(list('\nendif\n'))             mDefsMake.extend(list('\nendif\n'))
   
     return rv     return rv
  
 def getMgrUIDLine(defs, uidParam): def getMgrUIDLine(defs, uidParam):
Line 735  def writeProjFiles(pCfile, pMfile, pRfil
Line 735  def writeProjFiles(pCfile, pMfile, pRfil
         rv = bool(1)         rv = bool(1)
  
     if not rv:     if not rv:
           if os.path.exists(pCfile):
         try:         try:
             os.chmod(pCfile, stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)             os.chmod(pCfile, stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
         except OSError as exc:         except OSError as exc:
                   type, value, traceback = sys.exc_info()
                   print('Unable to chmod file ' + "'" + value.filename + "'.", file=sys.stderr)
             print(exc.strerror, file=sys.stderr)             print(exc.strerror, file=sys.stderr)
             rv = bool(1)             rv = bool(1)
  
Line 783  def configureNet(cfgfile, cfile, mfile,
Line 786  def configureNet(cfgfile, cfile, mfile,
                 rv = getMgrUIDLine(defs, uidParam)                 rv = getMgrUIDLine(defs, uidParam)
                 if rv == bool(0):                 if rv == bool(0):
                     rv = parseConfig(None, keymap, uidParam, defs, cDefs, mDefsGen, None, projCfg, projMkRules, projRules, projTarget, perlConstSection, perlInitSection)                     rv = parseConfig(None, keymap, uidParam, defs, cDefs, mDefsGen, None, projCfg, projMkRules, projRules, projTarget, perlConstSection, perlInitSection)
   
             # Configure the compiler-selection make variables.             # Configure the compiler-selection make variables.
             if not rv:             if not rv:
                 rv = configureComps(defs, mDefsComps)                 rv = configureComps(defs, mDefsComps)
Line 791  def configureNet(cfgfile, cfile, mfile,
Line 793  def configureNet(cfgfile, cfile, mfile,
             # Write out the parameter files.             # Write out the parameter files.
             if not rv:             if not rv:
                 rv = writeParamsFiles(base, cfile, mfile, pfile, cDefs, mDefsGen, mDefsMake, mDefsComps, perlConstSection, perlInitSection)                 rv = writeParamsFiles(base, cfile, mfile, pfile, cDefs, mDefsGen, mDefsMake, mDefsComps, perlConstSection, perlInitSection)
   
             # Write out the project-specific make files (make_basic.mk, Rules.mk, and target.mk).             # Write out the project-specific make files (make_basic.mk, Rules.mk, and target.mk).
             if not rv:             if not rv:
                 rv = writeProjFiles(pCfile, pMfile, pRfile, pTfile, projCfg, projMkRules, projRules, projTarget)                 rv = writeProjFiles(pCfile, pMfile, pRfile, pTfile, projCfg, projMkRules, projRules, projTarget)
   
     except IOError as exc:     except IOError as exc:
         print(exc.strerror, file=sys.stderr)         print(exc.strerror, file=sys.stderr)
         print('Unable to read configuration file ' + cfgfile + '.', file=sys.stderr)         print('Unable to read configuration file ' + cfgfile + '.', file=sys.stderr)


Legend:
Removed from v.1.9  
changed lines
  Added in v.1.11

Karen Tian
Powered by
ViewCVS 0.9.4