mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 01:42:24 +00:00
Use source diff to identify compiler changes.
This commit is contained in:
parent
9ad2a86827
commit
b445d95772
4 changed files with 61 additions and 23 deletions
33
src/tools/make/sourcechanges.sh
Normal file
33
src/tools/make/sourcechanges.sh
Normal 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 ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue