Sasha Smundak | a3be792 | 2021-06-14 10:56:24 -0700 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | # Convert and run one configuration |
Cole Faust | 057828d | 2021-10-01 17:51:23 -0700 | [diff] [blame^] | 3 | # Args: a product/board makefile optionally followed by additional arguments |
| 4 | # that will be passed to rbcrun. |
| 5 | [[ $# -gt 0 && -f "$1" ]] || { echo "Usage: ${0##*/} product.mk [Additional rbcrun arguments]" >&2; exit 1; } |
Sasha Smundak | a3be792 | 2021-06-14 10:56:24 -0700 | [diff] [blame] | 6 | set -eu |
| 7 | declare -r output_root=${OUT_DIR:-out} |
| 8 | declare -r runner="$output_root/soong/.bootstrap/bin/rbcrun" |
| 9 | declare -r converter="$output_root/soong/.bootstrap/bin/mk2rbc" |
| 10 | declare -r launcher=$output_root/launchers/run.rbc |
Cole Faust | 057828d | 2021-10-01 17:51:23 -0700 | [diff] [blame^] | 11 | declare -r makefile=$1 |
| 12 | shift |
| 13 | $converter -mode=write -r --outdir $output_root --launcher=$launcher $makefile |
| 14 | $runner RBC_OUT="make,global" RBC_DEBUG="${RBC_DEBUG:-}" $@ $launcher |
Sasha Smundak | a3be792 | 2021-06-14 10:56:24 -0700 | [diff] [blame] | 15 | |