[Buildroot] [git commit] utils/brmake: print the error code of the build
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Tue Jul 4 22:15:05 UTC 2017
commit: https://git.buildroot.net/buildroot/commit/?id=c8d8f74a939ac1381d7ac7dee356247f91347ace
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Since the stdout and stderr streams are redirected, it is not
immediately obvious when a build failed, even though brmake really exits
with the same error code as make did.
When there is an error, print the exit code after the elapsed time.
Reported-by: Arnout Vandecappelle <arnout at mind.be>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
utils/brmake | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/utils/brmake b/utils/brmake
index 3c6f848..e30119d 100755
--- a/utils/brmake
+++ b/utils/brmake
@@ -29,7 +29,12 @@ main() {
m=$((d/60))
d=$((d%60))
[ ${m} -eq 0 ] || { printf "%${mf}dmin " ${m}; sf="02"; }
- printf "%${sf}ds\n" ${d}
+ printf "%${sf}ds" ${d}
+
+ if [ ${ret} -ne 0 ]; then
+ printf " (error code: %s)" ${ret}
+ fi
+ printf "\n"
return ${ret}
}
More information about the buildroot
mailing list