mirror of https://github.com/zeldaret/mm.git
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>
This commit is contained in:
parent
9b51336f09
commit
9a424688b1
|
@ -32,18 +32,30 @@ Check for new warnings created.
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
-h Display this message and exit.
|
-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)
|
-j N use N jobs (does not support plain -j because you shouldn't use it anyway)
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
jobs=1
|
jobs=1
|
||||||
|
full=
|
||||||
|
run="make clean
|
||||||
|
make uncompressed"
|
||||||
|
|
||||||
while getopts "hj:" opt
|
|
||||||
|
|
||||||
|
while getopts "hfj:" opt
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
h) show_help
|
h) show_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
f) full="true"
|
||||||
|
run="make distclean
|
||||||
|
make setup
|
||||||
|
make disasm
|
||||||
|
make all"
|
||||||
|
;;
|
||||||
j) j_option_arg="$OPTARG"
|
j) j_option_arg="$OPTARG"
|
||||||
if [[ ! "${j_option_arg}" =~ ^[0-9]*$ ]]
|
if [[ ! "${j_option_arg}" =~ ^[0-9]*$ ]]
|
||||||
then
|
then
|
||||||
|
@ -61,10 +73,7 @@ shift $(($OPTIND - 1))
|
||||||
|
|
||||||
# Confirm run with -j jobs
|
# Confirm run with -j jobs
|
||||||
echo "This will run
|
echo "This will run
|
||||||
make distclean
|
$run
|
||||||
make setup
|
|
||||||
make disasm
|
|
||||||
make all
|
|
||||||
using $jobs threads. This may take some time."
|
using $jobs threads. This may take some time."
|
||||||
read -r -p "Is this okay? [Y/n]" response
|
read -r -p "Is this okay? [Y/n]" response
|
||||||
response=${response,,} # tolower
|
response=${response,,} # tolower
|
||||||
|
@ -90,16 +99,20 @@ make_warnings () {
|
||||||
&& rm tools/warnings_count/warnings_temp.txt
|
&& 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 "
|
if [[ $full ]]; then
|
||||||
$(tput ${TPUTTERM} setaf 3)(lots of make output ${TPUTTERM} here...)
|
$COMPARE_WARNINGS setup
|
||||||
$RST"
|
$COMPARE_WARNINGS disasm
|
||||||
$COMPARE_WARNINGS setup
|
fi
|
||||||
$COMPARE_WARNINGS disasm
|
|
||||||
$COMPARE_WARNINGS build
|
$COMPARE_WARNINGS build
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue