[U-Boot] "MAKEALL: Add summary information" breaks MAKEALL return code

Wolfgang Denk wd at denx.de
Sun Dec 6 00:12:21 CET 2009


Dear Peter,

your commit 40a28f0885 (MAKEALL: Add summary information) breaks
MAKEALL because we now don't get any useful return code any more.
You may argument that we didn't get one before, which is correct for
building multiple boards in one call. But when running something like
"MAKEALL <board>" we did get a return code, so wee could use this for
example with "git bisect run".

One possible fix could look like this:

diff --git a/MAKEALL b/MAKEALL
index d63c5c2..0cafed8 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -952,13 +952,16 @@ build_target() {
 #-----------------------------------------------------------------------
 
 print_stats() {
+	rc=0
 	echo ""
 	echo "--------------------- SUMMARY ----------------------------"
 	echo "Boards compiled: ${TOTAL_CNT}"
 	if [ ${ERR_CNT} -gt 0 ] ; then
+		rc=1
 		echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
 	fi
 	echo "----------------------------------------------------------"
+	exit $rc
 }
 
 #-----------------------------------------------------------------------


But I don't really like this approach, as it still changes behaviour:
now even warnings get accounted as errors. What do you think?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An expert is a person who avoids the small errors while  sweeping  on
to the grand fallacy.


More information about the U-Boot mailing list