###################################################################### # build the outofdate set # pass 1; go through and build AST files for everything failedcompiles = [] if allatonce and len(outofdate) > 0: compiled = 0 try: buildutils.system('cl -A -M '+string.join(outofdate, ' '), 0, verbose) compiled = 1 except buildutils.NonZeroExitStatus: sys.stderr.write('Interfaces failed to compile\n') failedcompiles.append(outofdate) for interface in outofdate: if not allatonce: compiled = 0 try: buildutils.system('cl -A -M '+interface, 0, verbose) compiled = 1 except buildutils.NonZeroExitStatus: sys.stderr.write('Error; interface '+interface+' failed to compile\n') failedcompiles.append(interface)
###################################################################### """) o.write('files = {\n') dirs = packages[package]['files'].keys() dirs.sort() for dir in dirs: files = packages[package]['files'][dir] files.sort() o.write('\t' + ` dir ` + ' : ' + ` files ` + ',\n') o.write('}\n') o.close() if len(sys.argv) >= 2: if len(sys.argv) == 3: buildutils.system('mkdir -p ' + sys.argv[1] + '/' + package + '/master') buildutils.system('(cd ' + sys.argv[1] + '/' + package + ' && prcs checkout -r ' + sys.argv[2] + '.@ ' + package + ')') targetdir = sys.argv[1] + '/' + package + '/master' print targetdir #buildutils.maybemakedir(targetdir) for dir in packages[package]['files'].keys(): if dir == 'glue/packages': continue print '\t' + dir buildutils.system('mkdir -p ' + targetdir + '/' + dir) for file in packages[package]['files'][dir]: if os.path.isfile(treeinfo.source_tree_dir + '/' + dir + '/' + file): buildutils.copy( treeinfo.source_tree_dir + '/' + dir + '/' + file,
if objstatbuf and objstatbuf[stat.ST_MTIME] < symliststatbuf[stat.ST_MTIME]: Verbosity( "(Cache of %s newer than bin of %s)" % (time.ctime(symliststatbuf[stat.ST_MTIME]), time.ctime(objstatbuf[stat.ST_MTIME])) ) regen = 0 # no if it exists and is in date except posix.error: pass # the stat must have failed, but I do not care deps.append(objname + nmfilt) if regen: Verbosity("Scanning for symbols") try: buildutils.system( nmcommand + " " + objname + nmfilt + ' | grep -E "_export$|_primal$" > ' + symlistfilename, verbose=0 ) except: sys.stderr.write( "Could not obtain symbols from " + objname + "; perhaps it did not exist because it did not build properly?\n" ) exportsstrs = [] otemp = open(symlistfilename) exportsstrs = otemp.readlines() otemp.close() exports = [] for exportsstr in exportsstrs: fields = string.split(exportsstr[:-1])
###################################################################### """) o.write('files = {\n') dirs = packages[package]['files'].keys() dirs.sort() for dir in dirs: files = packages[package]['files'][dir] files.sort() o.write('\t'+`dir`+' : '+`files`+',\n') o.write('}\n') o.close() if len(sys.argv) >= 2: if len(sys.argv) == 3: buildutils.system('mkdir -p '+sys.argv[1]+'/'+package+'/master') buildutils.system('(cd '+sys.argv[1]+'/'+package+' && prcs checkout -r '+sys.argv[2]+'.@ '+package+')') targetdir = sys.argv[1]+'/'+package+'/master' print targetdir #buildutils.maybemakedir(targetdir) for dir in packages[package]['files'].keys(): if dir == 'glue/packages': continue print '\t'+dir buildutils.system('mkdir -p '+targetdir+'/'+dir) for file in packages[package]['files'][dir]: if os.path.isfile(treeinfo.source_tree_dir+'/'+dir+'/'+file): buildutils.copy( treeinfo.source_tree_dir+'/'+dir+'/'+file, targetdir+'/'+dir+'/'+file) buildutils.system('mkdir -p '+targetdir+'/glue/packages') buildutils.copy(
# do we need to generate the local copy of the list of exported symbols in the file? try: symliststatbuf = os.stat(symlistfilename) if objstatbuf and objstatbuf[stat.ST_MTIME] < symliststatbuf[stat.ST_MTIME]: Verbosity('(Cache of %s newer than bin of %s)' % (time.ctime(symliststatbuf[stat.ST_MTIME]), time.ctime(objstatbuf[stat.ST_MTIME]))) regen = 0 # no if it exists and is in date except posix.error: pass # the stat must have failed, but I do not care deps.append(objname+nmfilt) if regen: Verbosity('Scanning for symbols') try: buildutils.system(nmcommand+' '+objname+nmfilt +' | grep -E "_export$|_primal$" > '+symlistfilename, verbose=0) except: sys.stderr.write('Could not obtain symbols from '+objname+'; perhaps it did not exist because it did not build properly?\n') exportsstrs = [] otemp = open(symlistfilename) exportsstrs = otemp.readlines() otemp.close() exports = [] for exportsstr in exportsstrs: fields = string.split(exportsstr[:-1]) #print item.get_name(), fields[2] c_id_name = fields[2] splitlist = string.split(c_id_name, '_') symname = string.join(splitlist[:-1], '_') prefix = ''
sys.stderr.write('(building ' + interface + ' reason: ' + nowoutofdate[interface] + ')\n') ###################################################################### # build the outofdate set # pass 1; go through and build AST files for everything failedcompiles = [] if allatonce and len(outofdate) > 0: compiled = 0 try: print('HELLO MICHAEL I CAN SEE YOU cl -A -M ' + string.join(outofdate, ' ')) buildutils.system('cl -A -M ' + string.join(outofdate, ' '), 0, verbose) compiled = 1 except buildutils.NonZeroExitStatus: sys.stderr.write('Interfaces failed to compile\n') failedcompiles.append(outofdate) for interface in outofdate: if not allatonce: compiled = 0 try: buildutils.system('cl -A -M ' + interface, 0, verbose) compiled = 1 except buildutils.NonZeroExitStatus: sys.stderr.write('Error; interface ' + interface + ' failed to compile\n') failedcompiles.append(interface)