Commit 9a54fa10 authored by Alessandro Rubini's avatar Alessandro Rubini

build scripts: force .config if missing

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 30125a40
......@@ -168,3 +168,17 @@ wrs_download () {
# Every time wrs_functions is loaded, re-set WRS_MAKE_J
export WRS_MAKE_J_NUMBER=$(expr $(grep ^processor /proc/cpuinfo | wc -l) + 1)
export WRS_MAKE_J=-j$WRS_MAKE_J_NUMBER
# Also, check the configuration each time this is executed (i.e., each step)
WRS_CONFIG_DIR=$(dirname "$WRS_BASE_DIR")
if [ -f "$WRS_CONFIG_DIR/.config" ]; then
true
else
echo "No configuration, using default" >& 2
(cd "$WRS_CONFIG_DIR" && make defconfig)
if [ $? -ne 0 ]; then wrs_die "Configuration failed"; fi
fi
# and import the configuration variables
. $WRS_CONFIG_DIR/.config
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