mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
Conform to an old change to bootcheck: grades must be passed on the
Estimated hours taken: 1 tools/makebatch: Conform to an old change to bootcheck: grades must be passed on the command line, not in Mmake.params. Generate files that sort the same way alphabetically as well as numerically.
This commit is contained in:
@@ -134,50 +134,59 @@ do
|
|||||||
if $needgrade
|
if $needgrade
|
||||||
then
|
then
|
||||||
grade=`awk "NR == $n" batch/$batch.GRADE`
|
grade=`awk "NR == $n" batch/$batch.GRADE`
|
||||||
echo "GRADE = $grade" >> Mmake.stage.params
|
gradeopt="--grade $grade"
|
||||||
|
else
|
||||||
|
gradeopt=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp Mmake.stage.params batch/$batch.params.$n
|
if test $n < 10
|
||||||
echo starting bootcheck of version $n
|
|
||||||
if tools/bootcheck -r $jfactor $runtests $objects > batch/$batch.out.$n 2>&1
|
|
||||||
then
|
then
|
||||||
echo bootcheck of version $n succeeded
|
visn="0$n"
|
||||||
echo bootcheck succeeded > batch/$batch.out.$n
|
else
|
||||||
mv stage2/compiler/mercury_compile batch/$batch.mercury_compile.$n
|
visn="$n"
|
||||||
echo -n "batch/$batch.mercury_compile.$n " >> batch/$batch.sizes
|
else
|
||||||
size batch/$batch.mercury_compile.$n | tail -1 >> batch/$batch.sizes
|
|
||||||
/bin/rm -f batch/$batch.mercury_compile.$n.gz > /dev/null 2>&1
|
cp Mmake.stage.params batch/$batch.params.$visn
|
||||||
gzip batch/$batch.mercury_compile.$n
|
echo starting bootcheck of version $visn
|
||||||
|
if tools/bootcheck $gradeopt -r $jfactor $runtests $objects > batch/$batch.out.$visn 2>&1
|
||||||
|
then
|
||||||
|
echo bootcheck of version $visn succeeded
|
||||||
|
echo bootcheck succeeded > batch/$batch.out.$visn
|
||||||
|
mv stage2/compiler/mercury_compile batch/$batch.mercury_compile.$visn
|
||||||
|
echo -n "batch/$batch.mercury_compile.$visn " >> batch/$batch.sizes
|
||||||
|
size batch/$batch.mercury_compile.$visn | tail -1 >> batch/$batch.sizes
|
||||||
|
/bin/rm -f batch/$batch.mercury_compile.$visn.gz > /dev/null 2>&1
|
||||||
|
gzip batch/$batch.mercury_compile.$visn
|
||||||
else
|
else
|
||||||
if test "$failed" = "wanted"
|
if test "$failed" = "wanted"
|
||||||
then
|
then
|
||||||
if test -x stage2/compiler/mercury_compile
|
if test -x stage2/compiler/mercury_compile
|
||||||
then
|
then
|
||||||
echo bootcheck of version $n failed but produced compiler
|
echo bootcheck of version $visn failed but produced compiler
|
||||||
mv stage2/compiler/mercury_compile batch/$batch.mercury_compile.$n
|
mv stage2/compiler/mercury_compile batch/$batch.mercury_compile.$visn
|
||||||
size batch/$batch.mercury_compile.$n | tail -1 >> batch/$batch.sizes
|
size batch/$batch.mercury_compile.$visn | tail -1 >> batch/$batch.sizes
|
||||||
/bin/rm -f batch/$batch.mercury_compile.$n.gz > /dev/null 2>&1
|
/bin/rm -f batch/$batch.mercury_compile.$visn.gz > /dev/null 2>&1
|
||||||
gzip batch/$batch.mercury_compile.$n
|
gzip batch/$batch.mercury_compile.$visn
|
||||||
|
|
||||||
else
|
else
|
||||||
echo bootcheck of version $n failed and did not produce compiler
|
echo bootcheck of version $visn failed and did not produce compiler
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo bootcheck of version $n failed
|
echo bootcheck of version $visn failed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$objects" = "-k"
|
if test "$objects" = "-k"
|
||||||
then
|
then
|
||||||
echo saving object files
|
echo saving object files
|
||||||
mkdir -p batch/objs/$batch.library.$n
|
mkdir -p batch/objs/$batch.library.$visn
|
||||||
/bin/rm -fr batch/objs/$batch.library.$n/*
|
/bin/rm -fr batch/objs/$batch.library.$visn/*
|
||||||
cp stage2/library/*.o batch/objs/$batch.library.$n
|
cp stage2/library/*.o batch/objs/$batch.library.$visn
|
||||||
gzip batch/objs/$batch.library.$n/*
|
gzip batch/objs/$batch.library.$visn/*
|
||||||
mkdir -p batch/objs/$batch.compiler.$n
|
mkdir -p batch/objs/$batch.compiler.$visn
|
||||||
/bin/rm -fr batch/objs/$batch.compiler.$n/*
|
/bin/rm -fr batch/objs/$batch.compiler.$visn/*
|
||||||
cp stage2/compiler/*.o batch/objs/$batch.compiler.$n
|
cp stage2/compiler/*.o batch/objs/$batch.compiler.$visn
|
||||||
gzip batch/objs/$batch.compiler.$n/*
|
gzip batch/objs/$batch.compiler.$visn/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
n=`expr $n + 1`
|
n=`expr $n + 1`
|
||||||
|
|||||||
Reference in New Issue
Block a user