summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2015-02-03 19:14:44 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2015-02-04 12:51:22 +0100
commit5e1f14d960c58a70f16a129ac65da579a393e234 (patch)
treef65066881d1b6e1b78974c40869937be28c0507d
parentade5b109ac88d0903f25e5ac175cbf1d7eafbdfe (diff)
downloadbarebox-5e1f14d960c58a70f16a129ac65da579a393e234.tar.gz
MAKEALL: check the return code of "make" rather than "printf"
Currently, MAKEALL always reports "Configure: OK" and "Compile: OK" regardless of the result of the configuration and compile. $ LANG=C CROSS_COMPILE=arm-linux-gnueabi- ./MAKEALL -a arm foo_defconfig Building arm foo_defconfig make[2]: *** [foo_defconfig] Error 1 make[1]: *** [foo_defconfig] Error 2 make: *** [foo_defconfig] Error 2 Configure: OK *** *** Configuration file ".config" not found! *** *** Please run some configurator (e.g. "make oldconfig" or *** "make menuconfig" or "make xconfig"). *** make[3]: *** [silentoldconfig] Error 1 make[2]: *** [silentoldconfig] Error 2 make[1]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop. make[1]: *** Waiting for unfinished jobs.... make: *** [_all] Error 2 Compile: OK arm-linux-gnueabi-size: 'makeall_builddir/barebox': No such file Compiled in 2s The check_pipe_status() function must be called right after "make" command, not "printf" command. ("printf" probably succeeds all the time.) Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rwxr-xr-xMAKEALL13
1 files changed, 9 insertions, 4 deletions
diff --git a/MAKEALL b/MAKEALL
index bf9131a..4185cd1 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -114,17 +114,22 @@ do_build_target() {
MAKE="make -C ${here} CROSS_COMPILE=${cross_compile} ARCH=${arch} O=${BUILDDIR}"
${MAKE} -j${JOBS} ${target} 2>&1 > "${log_report}" | tee "${log_err}"
- printf "Configure: " | tee -a "${log_report}"
check_pipe_status
- if [ "$?" = "0" ]; then
+ result="$?"
+
+ printf "Configure: " | tee -a "${log_report}"
+
+ if [ "$result" = "0" ]; then
printf "OK \n" | tee -a "${log_report}"
${MAKE} -j${JOBS} -s 2>&1 >> "${log_report}" | tee -a "${log_err}"
+ check_pipe_status
+ result="$?"
+
printf "Compile: " ${target} | tee -a "${log_report}"
- check_pipe_status
- if [ "$?" = "0" ]; then
+ if [ "$result" = "0" ]; then
printf "OK \n" | tee -a "${log_report}"
${cross_compile}size ${BUILDDIR}/barebox | tee -a "${log_report}"
else