Use source diff to identify compiler changes.

This commit is contained in:
David Brown 2016-07-08 22:47:40 +01:00
parent 9ad2a86827
commit b445d95772
4 changed files with 61 additions and 23 deletions

View file

@ -0,0 +1,33 @@
# Source change tests.
#
# Compares compiler source files against the appropriate bootstrap source.
# The voc compiler version comment line is skipped.
#
# Parameters
#
# $1 - bootstrap directory
#
# Assumptions
#
# The current directory is the build directory
changes="0"
for f in $1/*; do
fn=$(basename $f)
egrep -v "^/\* voc " $f >$fn.old
egrep -v "^/\* voc " $fn >$fn.new
if ! diff --tabsize=2 -U 2 -b $fn.old $fn.new >$fn.diff; then
echo ""
echo ""
cat $fn.diff
changes=1;
fi
rm -f $fn.old $fn.new $fn.diff
done
echo ""
if [ $changes == "0" ]; then
echo "--- Generated c source files match bootstrap ---"
else
echo "--- Generated c source files differ from bootstrap ---"
fi
echo ""