X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=scripts%2Fhvk-compile.sh;h=f9076d30ba1225445ca1de7af229e016ef9d236f;hb=1fb7f27af45bc56ba87fd9ad73751fcafb332ee3;hp=a749c43e5b1248f8fecb7fa53c7c93ec8ab39999;hpb=392d2753816d2ff57977e9d8838ae7e0ac00b5bc;p=hvutilities.git diff --git a/scripts/hvk-compile.sh b/scripts/hvk-compile.sh index a749c43..f9076d3 100755 --- a/scripts/hvk-compile.sh +++ b/scripts/hvk-compile.sh @@ -12,12 +12,14 @@ print_usage() echo "Options:" echo " -h display this help and exit" echo " -r reboot after deploying files" + echo " -w compile with W=1" echo } reboot=0 +warnings_opts="" -while getopts "hr" flag ;do +while getopts "hrw" flag ;do case ${flag} in h) print_usage @@ -26,6 +28,9 @@ while getopts "hr" flag ;do r) reboot=1 ;; + w) + warnings_opts="W=1" + ;; ?) echo "${PROG_NAME}: Invalid option: ${OPTARG}." echo "Try \`${PROG_NAME} -h' for more information." @@ -43,6 +48,14 @@ if [ $# -gt 1 ]; then exit 1 fi +if [ ! -f .config ]; then + echo "Missing configuration file .config." + echo "Configure your kernel by running 'hvk-init.sh'" + exit 1 +fi + +KMAKE="${KMAKE} ${warnings_opts}" + ${KMAKE} if [ x"${mode}" = x"linux" ]; then