def run(self, args): opts = setup_build_options(args) if args.clean: clean_dirs(opts) manifest = load_project(opts, args.project) ctx = context_from_host_tuple() print("Building on %s" % ctx) projects = manifests_in_dependency_order(opts, manifest, ctx) manifests_by_name = {m.name: m for m in projects} # Accumulate the install directories so that the build steps # can find their dep installation install_dirs = [] for m in projects: ctx = dict(ctx) if args.enable_tests and m.name == manifest.name: ctx["test"] = "on" else: ctx["test"] = "off" fetcher = m.create_fetcher(opts, ctx) if args.clean: fetcher.clean() dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx) build_dir = dirs["build_dir"] inst_dir = dirs["inst_dir"] if m == manifest or not args.no_deps: print("Assessing %s..." % m.name) change_status = fetcher.update() reconfigure = change_status.build_changed() sources_changed = change_status.sources_changed() built_marker = os.path.join(inst_dir, ".built-by-getdeps") if os.path.exists(built_marker): with open(built_marker, "r") as f: built_hash = f.read().strip() if built_hash != dirs["hash"]: # Some kind of inconsistency with a prior build, # let's run it again to be sure os.unlink(built_marker) reconfigure = True if sources_changed or reconfigure or not os.path.exists( built_marker): if os.path.exists(built_marker): os.unlink(built_marker) src_dir = fetcher.get_src_dir() builder = m.create_builder(opts, src_dir, build_dir, inst_dir, ctx) builder.build(install_dirs, reconfigure=reconfigure) with open(built_marker, "w") as f: f.write(dirs["hash"]) install_dirs.append(inst_dir)
def run(self, args): opts = setup_build_options(args) manifest = load_project(opts, args.project) ctx = context_from_host_tuple(args.host_type) for m in manifests_in_dependency_order(opts, manifest, ctx): print(m.name) return 0
def run(self, args): opts = setup_build_options(args) manifest = load_project(opts, args.project) ctx = context_from_host_tuple() ctx["test"] = "on" projects = manifests_in_dependency_order(opts, manifest, ctx) manifests_by_name = {m.name: m for m in projects} # Accumulate the install directories so that the test steps # can find their dep installation install_dirs = [] for m in projects: fetcher = m.create_fetcher(opts, ctx) dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx) build_dir = dirs["build_dir"] inst_dir = dirs["inst_dir"] if m == manifest or args.test_all: built_marker = os.path.join(inst_dir, ".built-by-getdeps") if not os.path.exists(built_marker): print("project %s has not been built" % m.name) # TODO: we could just go ahead and build it here, but I # want to tackle that as part of adding build-for-test # support. return 1 src_dir = fetcher.get_src_dir() builder = m.create_builder(opts, src_dir, build_dir, inst_dir, ctx) builder.run_tests(install_dirs) install_dirs.append(inst_dir)
def run(self, args): opts = setup_build_options(args) manifest = load_project(opts, args.project) ctx = context_from_host_tuple(facebook_internal=args.facebook_internal) projects = manifests_in_dependency_order(opts, manifest, ctx) manifests_by_name = {m.name: m for m in projects} # Accumulate the install directories so that the build steps # can find their dep installation install_dirs = [] for m in projects: ctx = dict(ctx) if args.enable_tests and m.name == manifest.name: ctx["test"] = "on" else: ctx["test"] = "off" fetcher = m.create_fetcher(opts, ctx) dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx) inst_dir = dirs["inst_dir"] install_dirs.append(inst_dir) if m == manifest: dep_munger = create_dyn_dep_munger(opts, install_dirs) dep_munger.process_deps(args.destdir, args.final_install_prefix)
def run(self, args): opts = setup_build_options(args) if args.clean: clean_dirs(opts) manifest = load_project(opts, args.project) ctx = context_from_host_tuple() print("Building on %s" % ctx) projects = manifests_in_dependency_order(opts, manifest, ctx) manifests_by_name = {m.name: m for m in projects} # Accumulate the install directories so that the build steps # can find their dep installation install_dirs = [] for m in projects: ctx = dict(ctx) if args.enable_tests and m.name == manifest.name: ctx["test"] = "on" else: ctx["test"] = "off" fetcher = m.create_fetcher(opts, ctx) if args.clean: fetcher.clean() dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx) build_dir = dirs["build_dir"] inst_dir = dirs["inst_dir"] if m == manifest or not args.no_deps: print("Assessing %s..." % m.name) change_status = fetcher.update() reconfigure = change_status.build_changed() sources_changed = change_status.sources_changed() built_marker = os.path.join(inst_dir, ".built-by-getdeps") if os.path.exists(built_marker): with open(built_marker, "r") as f: built_hash = f.read().strip() if built_hash != dirs["hash"]: # Some kind of inconsistency with a prior build, # let's run it again to be sure os.unlink(built_marker) reconfigure = True if sources_changed or reconfigure or not os.path.exists(built_marker): if os.path.exists(built_marker): os.unlink(built_marker) src_dir = fetcher.get_src_dir() builder = m.create_builder(opts, src_dir, build_dir, inst_dir, ctx) builder.build(install_dirs, reconfigure=reconfigure) with open(built_marker, "w") as f: f.write(dirs["hash"]) install_dirs.append(inst_dir)
def run(self, args): opts = setup_build_options(args) manifest = load_project(opts, args.project) ctx = context_from_host_tuple(args.host_type) if args.recursive: projects = manifests_in_dependency_order(opts, manifest, ctx) else: projects = [manifest] for m in projects: fetcher = m.create_fetcher(opts, ctx) fetcher.update()
def run(self, args): opts = setup_build_options(args) manifest = load_project(opts, args.project) ctx = context_from_host_tuple() if args.recursive: manifests = manifests_in_dependency_order(opts, manifest, ctx) else: manifests = [manifest] for m in manifests: fetcher = m.create_fetcher(opts, ctx) print(fetcher.get_src_dir())
def run(self, args): opts = setup_build_options(args) manifest = load_project(opts, args.project) ctx = context_from_host_tuple() projects = manifests_in_dependency_order(opts, manifest, ctx) manifests_by_name = {m.name: m for m in projects} if args.recursive: manifests = projects else: manifests = [manifest] for m in manifests: fetcher = m.create_fetcher(opts, ctx) dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx) inst_dir = dirs["inst_dir"] print(inst_dir)