diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2009-12-06 23:58:28 -0600 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-12-07 23:06:42 +0100 |
commit | f2352877cb2daac88115192fb09991a2397d0b27 (patch) | |
tree | 72ab3950063eb1d0f646ccec05e1d2f13087e791 | |
parent | fbc1c8f6f6c972524197829c56dd8f2f5da0200a (diff) | |
download | u-boot-imx-f2352877cb2daac88115192fb09991a2397d0b27.zip u-boot-imx-f2352877cb2daac88115192fb09991a2397d0b27.tar.gz u-boot-imx-f2352877cb2daac88115192fb09991a2397d0b27.tar.bz2 |
MAKEALL: Fix return value
Previously MAKEALL would always return a value of 0, even if 1 or more
boards did not compile. This change causes MAKEALL to return 0 if all
boards were able to build, otherwise 1.
This change also requires changing the script interpreter from sh to
bash to support bash's PIPESTATUS variable.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-rwxr-xr-x | MAKEALL | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Print statistics when we exit trap exit 1 2 3 15 @@ -39,6 +39,7 @@ LIST="" ERR_CNT=0 ERR_LIST="" TOTAL_CNT=0 +RC=0 ######################################################################### ## MPC5xx Systems @@ -936,6 +937,12 @@ build_target() { ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \ | tee ${LOG_DIR}/$target.ERR + + # Check for 'make' errors + if [ ${PIPESTATUS[0]} -ne 0 ] ; then + RC=1 + fi + if [ -s ${LOG_DIR}/$target.ERR ] ; then ERR_CNT=$((ERR_CNT + 1)) ERR_LIST="${ERR_LIST} $target" @@ -959,6 +966,8 @@ print_stats() { echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )" fi echo "----------------------------------------------------------" + + exit $RC } #----------------------------------------------------------------------- |