[U-Boot] [PATCH v2] MAKEALL: Fix return value

Wolfgang Denk wd at denx.de
Mon Dec 7 23:07:32 CET 2009


Dear Peter Tyser,

In message <1260165508-10052-1-git-send-email-ptyser at 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 <ptyser at xes-inc.com>
> ---
> 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 at cygnus.com>


More information about the U-Boot mailing list