From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/5] MAKEALL: check the return code of "make" rather than "printf"
Date: Tue, 3 Feb 2015 19:14:44 +0900 [thread overview]
Message-ID: <1422958489-8855-2-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1422958489-8855-1-git-send-email-yamada.m@jp.panasonic.com>
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>
---
MAKEALL | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/MAKEALL b/MAKEALL
index 9bd7b2e..9a56ceb 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -113,17 +113,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
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-02-03 10:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 10:14 [PATCH 0/5] MAKEALL: fixes and refactorings Masahiro Yamada
2015-02-03 10:14 ` Masahiro Yamada [this message]
2015-02-03 10:14 ` [PATCH 2/5] MAKEALL: remove false positive error check Masahiro Yamada
2015-02-03 10:14 ` [PATCH 3/5] MAKEALL: use $(...) instead of `...` for readability Masahiro Yamada
2015-02-03 10:14 ` [PATCH 4/5] MAKEALL: do not pass unneeded -C option to make Masahiro Yamada
2015-02-03 10:14 ` [PATCH 5/5] MAKEALL: consolidate -j${JOBS} argument Masahiro Yamada
2015-02-04 11:51 ` [PATCH 0/5] MAKEALL: fixes and refactorings Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422958489-8855-2-git-send-email-yamada.m@jp.panasonic.com \
--to=yamada.m@jp.panasonic.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox