Commit cdfca821 authored by Mark Brown's avatar Mark Brown Committed by Masahiro Yamada

merge_config.sh: Check error codes from make

When we execute make after merging the configurations we ignore any
errors it produces causing whatever is running merge_config.sh to be
unaware of any failures.  This issue was noticed by Guillaume Tucker
while looking at problems with testing of clang only builds in KernelCI
which caused Kbuild to be unable to find a working host compiler.

This implementation was suggested by Yamada-san.
Suggested-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: default avatarGuillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent eb27ea5c
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
# Copyright (c) 2009-2010 Wind River Systems, Inc. # Copyright (c) 2009-2010 Wind River Systems, Inc.
# Copyright 2011 Linaro # Copyright 2011 Linaro
set -e
clean_up() { clean_up() {
rm -f $TMP_FILE rm -f $TMP_FILE
rm -f $MERGE_FILE rm -f $MERGE_FILE
exit
} }
trap clean_up HUP INT TERM
usage() { usage() {
echo "Usage: $0 [OPTIONS] [CONFIG [...]]" echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
...@@ -110,6 +110,9 @@ TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) ...@@ -110,6 +110,9 @@ TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
MERGE_FILE=$(mktemp ./.merge_tmp.config.XXXXXXXXXX) MERGE_FILE=$(mktemp ./.merge_tmp.config.XXXXXXXXXX)
echo "Using $INITFILE as base" echo "Using $INITFILE as base"
trap clean_up EXIT
cat $INITFILE > $TMP_FILE cat $INITFILE > $TMP_FILE
# Merge files, printing warnings on overridden values # Merge files, printing warnings on overridden values
...@@ -155,7 +158,6 @@ if [ "$RUNMAKE" = "false" ]; then ...@@ -155,7 +158,6 @@ if [ "$RUNMAKE" = "false" ]; then
echo "#" echo "#"
echo "# merged configuration written to $KCONFIG_CONFIG (needs make)" echo "# merged configuration written to $KCONFIG_CONFIG (needs make)"
echo "#" echo "#"
clean_up
exit exit
fi fi
...@@ -185,5 +187,3 @@ for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do ...@@ -185,5 +187,3 @@ for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do
echo "" echo ""
fi fi
done done
clean_up
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment