def build_and_save_archdef(): try: ARCHDEF_SAVE_DIR = os.environ['SAGE_ATLAS_SAVE_ARCHDEF'] except KeyError: return os.chdir(os.path.join(BUILD_DIR, 'ARCHS')) rc = system_with_flush(MAKE + ' ArchNew') assert_success(rc, bad='Making archdef failed.', good='Finished building archdef.') rc = system_with_flush(MAKE + ' tarfile') assert_success(rc, bad='Making archdef tarfile failed.', good='Finished building archdef tarfile.') for tarfile in glob.glob('*.tar.bz2'): cp(tarfile, ARCHDEF_SAVE_DIR)
else: write_pc_file(['blas'], 'cblas') write_pc_file(['blas'], 'blas') write_pc_file(['lapack', 'blas'], 'lapack') sys.exit(0) # Because blas, cblas and lapack libraries are properly linked # with no unknown symbols, no extra libraries needs to be given. write_pc_file(['cblas'], 'cblas') write_pc_file(['f77blas'], 'blas') write_pc_file(['lapack'], 'lapack') # add extra architectural defaults cp('src/ARCHS/*.tar.bz2', 'src/ATLAS/CONFIG/ARCHS/') # hardcoded gcc in SpewMakeInc.c edit_in_place('src/ATLAS/CONFIG/src/SpewMakeInc.c') \ .replace(' goodgcc = .*', ' goodgcc = "' + os.environ['CC'] + '";') \ .close() # override throttling check if architecture is specified edit_in_place('src/ATLAS/CONFIG/src/config.c') \ .replace('if \(mach == MACHOther\)', 'if (mach != MACHOther) thrchk=0; else') \ .close() ######################################################################
write_pc_file(['lapack', 'f77blas', 'cblas', 'atlas'], 'lapack') else: write_pc_file(['blas'], 'cblas') write_pc_file(['blas'], 'blas') write_pc_file(['lapack', 'blas'], 'lapack') sys.exit(0) # Because blas, cblas and lapack libraries are properly linked # with no unknown symbols, no extra libraries needs to be given. write_pc_file(['cblas'], 'cblas') write_pc_file(['f77blas'], 'blas') write_pc_file(['lapack'], 'lapack') # add extra architectural defaults cp('src/ARCHS/*.tar.bz2', 'src/ATLAS/CONFIG/ARCHS/') # hardcoded gcc in SpewMakeInc.c edit_in_place('src/ATLAS/CONFIG/src/SpewMakeInc.c') \ .replace(' goodgcc = .*', ' goodgcc = "' + os.environ['CC'] + '";') \ .close() # override throttling check if architecture is specified edit_in_place('src/ATLAS/CONFIG/src/config.c') \ .replace('if \(mach == MACHOther\)', 'if (mach != MACHOther) thrchk=0; else') \ .close() ###################################################################### ### configure functions ######################################################################