try: ccache_path = findfile('ccache', build_env['PATH']) except: # If could not find ccache, build it. print("\n========== Building: %s ==========" % ccache.__name__) Package.build(ccache(build_env.copy_set_default())) ccache_path = findfile('ccache', build_env['PATH']) new = dict( CC = P.join(compiler_dir, build_env['CC']), CXX = P.join(compiler_dir, build_env['CXX']), ) subprocess.check_call(['ln', '-sf', ccache_path, new['CC']]) subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']]) build_env.update(new) modes = dict( all = lambda pkg : Package.build(pkg, skip_fetch=False), fetch = lambda pkg : pkg.fetch(), nofetch = lambda pkg : Package.build(pkg, skip_fetch=True)) # Build the packages, skipping the ones already done done_file = opt.build_root + "/done.txt" done = read_done(done_file) try: for pkg in build: name = pkg.__name__ if name in done: print("Package %s was already built, skipping" % name) continue
try: ccache_path = findfile('ccache', build_env['PATH']) except: # If could not find ccache, build it. print("\n========== Building: %s ==========" % ccache.__name__) Package.build(ccache(build_env.copy_set_default())) ccache_path = findfile('ccache', build_env['PATH']) new = dict( CC=P.join(compiler_dir, build_env['CC']), CXX=P.join(compiler_dir, build_env['CXX']), ) subprocess.check_call(['ln', '-sf', ccache_path, new['CC']]) subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']]) build_env.update(new) modes = dict(all=lambda pkg: Package.build(pkg, skip_fetch=False), fetch=lambda pkg: pkg.fetch(), nofetch=lambda pkg: Package.build(pkg, skip_fetch=True)) # Build the packages, skipping the ones already done done_file = opt.build_root + "/done.txt" done = read_done(done_file) try: for pkg in build: name = pkg.__name__ if name in done: print("Package %s was already built, skipping" % name) continue print("\n========== Building: %s ==========" % name)
if opt.ccache: compiler_dir = P.join(e['MISC_DIR'], 'mycompilers') new = dict( CC = P.join(compiler_dir, e['CC']), CXX = P.join(compiler_dir, e['CXX']), CCACHE_DIR = P.join(opt.download_dir, 'ccache-dir'), CCACHE_BASEDIR = gettempdir(), ) if not P.exists(compiler_dir): os.makedirs(compiler_dir) ccache_path = findfile('ccache', e['PATH']) subprocess.check_call(['ln', '-sf', ccache_path, new['CC']]) subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']]) e.update(new) if opt.save_temps: e.append_many(CC_FLAGS, '-save-temps') else: e.append_many(CC_FLAGS, '-pipe') if len(args) == 0: # Were we told what isis to use? build = [isis_local if opt.isisroot is not None else isis] # Many things depend on isis 3rdparty, so do it before the rest build += [gsl_headers, geos_headers, superlu_headers, xercesc_headers, qt_headers, qwt_headers, cspice_headers, protobuf_headers] if arch.os == 'linux': build.extend([zlib, png, jpeg])