+build_targets() {
+ for t in "$@" ; do
+ # If a LIST_xxx var exists, use it. But avoid variable
+ # expansion in the eval when a board name contains certain
+ # characters that the shell interprets.
+ case ${t} in
+ *[-+=]*) list= ;;
+ *) list=$(eval echo '${LIST_'$t'}') ;;
+ esac
+ if [ -n "${list}" ] ; then
+ build_targets ${list}
+ else
+ build_target ${t}
+ fi
+ done
+}
+
+#-----------------------------------------------------------------------
+
+print_stats() {
+ echo ""
+ echo "--------------------- SUMMARY ----------------------------"
+ echo "Boards compiled: ${TOTAL_CNT}"
+ if [ ${ERR_CNT} -gt 0 ] ; then
+ echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
+ fi
+ echo "----------------------------------------------------------"
+
+ exit $RC
+}