• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/bash
2# Convert and run one configuration
3# Args: a product/board makefile optionally followed by additional arguments
4#       that will be passed to rbcrun.
5[[ $# -gt 1 && -f "$1" && -f "$2" ]] || { echo "Usage: ${0##*/} product.mk input_variables.mk [Additional rbcrun arguments]" >&2; exit 1; }
6set -eu
7
8declare -r output_root="${OUT_DIR:-out}"
9declare -r runner="${output_root}/rbcrun"
10declare -r converter="${output_root}/mk2rbc"
11declare -r launcher="${output_root}/rbc/launcher.rbc"
12declare -r makefile_list="${output_root}/.module_paths/configuration.list"
13declare -r makefile="$1"
14declare -r input_variables="$2"
15shift 2
16"${converter}" -mode=write -r --outdir "${output_root}/rbc" --input_variables "${input_variables}" --launcher="${launcher}" --makefile_list="${makefile_list}" "${makefile}"
17"${runner}" RBC_OUT="make,global" RBC_DEBUG="${RBC_DEBUG:-}" $@ "${launcher}"
18
19