Merge pull request #151 from mmichal10/log-from-configure
Log from configure
This commit is contained in:
commit
485bd352ed
32
configure
vendored
32
configure
vendored
@ -4,14 +4,44 @@
|
|||||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
#
|
#
|
||||||
|
|
||||||
|
MISSING_TOOLS=0
|
||||||
|
|
||||||
check_util() {
|
check_util() {
|
||||||
which $1 2>&1 > /dev/null || { echo >&2 "Error: missing '$1' utility"; exit 1; }
|
which $1 &> /dev/null
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo >&2 "Error: missing '$1' utility"
|
||||||
|
MISSING_TOOLS=1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_util dirname
|
check_util dirname
|
||||||
check_util realpath
|
check_util realpath
|
||||||
check_util basename
|
check_util basename
|
||||||
check_util awk
|
check_util awk
|
||||||
|
check_util python3
|
||||||
|
check_util sed
|
||||||
|
check_util make
|
||||||
|
check_util gcc
|
||||||
|
check_util lsblk
|
||||||
|
|
||||||
|
if [ ! -e /lib/modules/$(uname -r)/build/ &> /dev/null ]
|
||||||
|
then
|
||||||
|
echo >&2 "Error: missing kernel headers"
|
||||||
|
MISSING_TOOLS=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
`python3 -c "import argparse" &> /dev/null`
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo >&2 "Error: missing argparse python module"
|
||||||
|
MISSING_TOOLS=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MISSING_TOOLS" -ne "0" ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
SCRIPTPATH=`dirname $0`
|
SCRIPTPATH=`dirname $0`
|
||||||
SCRIPTPATH=`realpath $SCRIPTPATH`
|
SCRIPTPATH=`realpath $SCRIPTPATH`
|
||||||
|
@ -34,6 +34,7 @@ compile_module(){
|
|||||||
|
|
||||||
config_file=$1
|
config_file=$1
|
||||||
test_module_dir=$SCRIPTPATH/configure.d/${config_file}_dir
|
test_module_dir=$SCRIPTPATH/configure.d/${config_file}_dir
|
||||||
|
test_module_log=$SCRIPTPATH/configure.d/.${config_file}.log
|
||||||
test_module_file=$test_module_dir/test_mod.c
|
test_module_file=$test_module_dir/test_mod.c
|
||||||
test_module_obj=$test_module_dir/test_mod.o
|
test_module_obj=$test_module_dir/test_mod.o
|
||||||
|
|
||||||
@ -54,12 +55,19 @@ compile_module(){
|
|||||||
EOF
|
EOF
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
make -C $test_module_dir KERNEL_DIR=${KERNEL_DIR} &> /dev/null
|
echo "### $2 ###" >> $test_module_log
|
||||||
|
|
||||||
|
make -C $test_module_dir KERNEL_DIR=${KERNEL_DIR} &>> $test_module_log
|
||||||
|
|
||||||
local ret=$?
|
local ret=$?
|
||||||
|
|
||||||
rm -Rf $test_module_dir
|
rm -Rf $test_module_dir
|
||||||
|
|
||||||
|
if [ $ret -eq 0 ]
|
||||||
|
then
|
||||||
|
rm -f $test_module_log
|
||||||
|
fi
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
ocf
2
ocf
@ -1 +1 @@
|
|||||||
Subproject commit 17ec78d88f471cfe370d86d764e5fde59dd67069
|
Subproject commit 9e515e02712b80f01fed956894326bcaa031a4e9
|
Loading…
Reference in New Issue
Block a user