platform_build_soong/scripts/rbc-run
Lukacs T. Berki 04bd17ecb9 Fix paths rbc-run uses to access the rbc tools.
This was broken in aosp/1878498; ccross@ submitted aosp/1875758 between
writing that change and submitting it, which changed the paths to mk2rbc
and rbcrun, thereby breaking Starlark product configuration.

Test: Presubmits.
Change-Id: I185489589997e6bdc815a54a8f6f328c18f813d0
2021-11-04 18:02:22 +01:00

16 lines
684 B
Bash
Executable file

#! /bin/bash
# Convert and run one configuration
# Args: a product/board makefile optionally followed by additional arguments
# that will be passed to rbcrun.
[[ $# -gt 0 && -f "$1" ]] || { echo "Usage: ${0##*/} product.mk [Additional rbcrun arguments]" >&2; exit 1; }
set -eu
declare -r output_root="${OUT_DIR:-out}"
declare -r runner="${output_root}/soong/rbcrun"
declare -r converter="${output_root}/soong/mk2rbc"
declare -r launcher="${output_root}/launchers/run.rbc"
declare -r makefile="$1"
shift
"${converter}" -mode=write -r --outdir "${output_root}" --launcher="${launcher}" "${makefile}"
"${runner}" RBC_OUT="make,global" RBC_DEBUG="${RBC_DEBUG:-}" $@ "${launcher}"