2018-02-01 18:00:17 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2018-02-19 18:53:58 +00:00
|
|
|
function cecho {
|
|
|
|
case $1 in
|
|
|
|
red) tput setaf 1 ;;
|
|
|
|
green) tput setaf 2 ;;
|
|
|
|
yellow) tput setaf 3 ;;
|
|
|
|
esac
|
|
|
|
echo -e "$2"
|
|
|
|
tput sgr0
|
|
|
|
}
|
|
|
|
|
2018-02-01 18:00:17 +00:00
|
|
|
function do_make {
|
2018-04-11 04:12:48 +00:00
|
|
|
make $MAKE_FLAGS "$1" \
|
2018-02-19 18:53:58 +00:00
|
|
|
&& (cecho green "make $1 good") \
|
|
|
|
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
|
2018-02-01 18:00:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function verify {
|
2018-03-03 03:56:39 +00:00
|
|
|
diff "orig/$1" "out/$2" \
|
|
|
|
&& (cecho green "diff $2 good" ) \
|
|
|
|
|| (tput blink ; cecho red "DIFF $2 BAD" ; return 1)
|
2018-02-01 18:00:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function stats {
|
2018-03-04 19:35:04 +00:00
|
|
|
echo "$(printf '%-10s' $1)""$(../res/stats.pl < $1)"
|
2018-02-01 18:00:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#do_make clean
|
|
|
|
do_make all
|
|
|
|
|
2018-03-29 04:05:12 +00:00
|
|
|
COMMON="loader mgtk desktop invoker ovl1 ovl1a ovl1b ovl1c ovl2"
|
|
|
|
TARGETS="$COMMON ovl34567"
|
|
|
|
SOURCES="sys $COMMON ovl3 ovl4 ovl5 ovl6 ovl7"
|
2018-02-01 18:00:17 +00:00
|
|
|
|
|
|
|
# Verify original and output match
|
|
|
|
echo "Verifying diffs:"
|
|
|
|
for t in $TARGETS; do
|
2018-03-03 03:56:39 +00:00
|
|
|
verify "DESKTOP2_$t" "$t.built"
|
2018-02-01 18:00:17 +00:00
|
|
|
done;
|
2018-03-03 03:56:39 +00:00
|
|
|
verify "DESKTOP.SYSTEM.SYS" "sys.SYS"
|
2018-02-01 18:00:17 +00:00
|
|
|
|
2018-02-22 05:18:46 +00:00
|
|
|
# Compute stats
|
2018-03-06 05:20:00 +00:00
|
|
|
echo "Stats:"
|
2018-02-26 03:02:34 +00:00
|
|
|
for t in $SOURCES; do
|
2018-02-01 18:00:17 +00:00
|
|
|
stats "$t.s"
|
|
|
|
done;
|