From 9a424688b108104b3c0c34d9106c02fece7313c7 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Fri, 19 Nov 2021 07:52:32 -0800 Subject: [PATCH] Add ability to warnings script to just check building (not setup or disasm) (#414) * Add option to run warnings on just build * Rename all to full * Update tools/warnings_count/check_new_warnings.sh Remove testing code. Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> --- tools/warnings_count/check_new_warnings.sh | 41 ++++++++++++++-------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/tools/warnings_count/check_new_warnings.sh b/tools/warnings_count/check_new_warnings.sh index 7a196c28b..27cda1b25 100755 --- a/tools/warnings_count/check_new_warnings.sh +++ b/tools/warnings_count/check_new_warnings.sh @@ -32,18 +32,30 @@ Check for new warnings created. Optional arguments: -h Display this message and exit. + -f Run full build process -j N use N jobs (does not support plain -j because you shouldn't use it anyway) " } jobs=1 +full= +run="make clean + make uncompressed" -while getopts "hj:" opt + + +while getopts "hfj:" opt do case $opt in h) show_help exit 0 ;; + f) full="true" + run="make distclean + make setup + make disasm + make all" + ;; j) j_option_arg="$OPTARG" if [[ ! "${j_option_arg}" =~ ^[0-9]*$ ]] then @@ -61,10 +73,7 @@ shift $(($OPTIND - 1)) # Confirm run with -j jobs echo "This will run - make distclean - make setup - make disasm - make all + $run using $jobs threads. This may take some time." read -r -p "Is this okay? [Y/n]" response response=${response,,} # tolower @@ -90,16 +99,20 @@ make_warnings () { && rm tools/warnings_count/warnings_temp.txt } +if [[ $full ]]; then + make distclean + make_warnings setup setup + make_warnings disasm disasm + make_warnings all build +else + make clean + make_warnings uncompressed build +fi -make distclean -make_warnings setup setup -make_warnings disasm disasm -make_warnings all build -echo " -$(tput ${TPUTTERM} setaf 3)(lots of make output ${TPUTTERM} here...) -$RST" -$COMPARE_WARNINGS setup -$COMPARE_WARNINGS disasm +if [[ $full ]]; then + $COMPARE_WARNINGS setup + $COMPARE_WARNINGS disasm +fi $COMPARE_WARNINGS build