summaryrefslogtreecommitdiff
path: root/tools/check-v8
blob: 9dfa0be35ec51e99ae9ef2c6ada0937db505bebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

echo ------------------ Producing v8 files -------------------------
if [ -e v8 ]; then rm -r v8; fi
if [ -e /tmp/v8.$$ ]; then rm -r /tmp/v8.$$; fi
cp -pr . /tmp/v8.$$
mv /tmp/v8.$$ v8
cd v8
rm description
make clean
make COQFLAGS='-translate -q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)' || \
 { echo ---- Failed to translate; exit 1; }
echo ------------------ Upgrading v8 files -------------------------
v8files=`find . -name \*.v8`
for i in $v8files; do
  j=`dirname $i`/`basename $i .v8`.v
  echo Upgrading $i
  mv -u -f $i $j
done
echo ------------------ Recompiling v8 files -----------------------
make clean
make || { echo ---- Failed to recompile; exit 1; }
make clean # to save disk space
echo ------------------ Translation completed ----------------------