From: Wolfgang Denk Date: Mon, 07 Dec 2009 23:07:32 +0100 Subject: [U-Boot] [PATCH v2] MAKEALL: Fix return value In-Reply-To: <1260165508-10052-1-git-send-email-ptyser@xes-inc.com> References: <1260165508-10052-1-git-send-email-ptyser@xes-inc.com> Message-ID: <20091207220732.6498E3F6CC@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Peter Tyser, In message <1260165508-10052-1-git-send-email-ptyser@xes-inc.com> you wrote: > 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 > --- > Changes since v1: > - Return only 0 or 1 > > Mike pointed out that if we want to maintain POSIX compliance we could > replace the PIPESTATUS usage with: > # need to maintain exit value ourselves as pipes eat it > fail=${LOG_DIR}/$target.failed > rm -f ${fail} > (${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \ > || touch ${fail}) | tee ${LOG_DIR}/$target.ERR > [ -e ${fail} ] && RC=1 > rm -f ${fail} > > Let me know if others prefer POSIX compliance over the more straight- > forward PIPESATUS usage. For me, bash is just fine here. Looks more readable and does without additional temp files. > MAKEALL | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) Applied, thanks. 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 I will also, for an appropriate fee, certify that your keyboard is object-oriented, and that the bits on your hard disk are template- compatible. - Jeffrey S. Haemer in <411akr$3ga@cygnus.com>