Module of module types for OrderedType,ComparableType,Printable,Serializable,Discrete...
[ocaml.git] / build / camlp4-bootstrap.sh
blobd5b448b1613b4a20383cd025f3365bd29907c197
1 #!/bin/sh
2 # $Id$
3 set -e
4 cd `dirname $0`/..
6 TMPTARGETS="\
7 camlp4/boot/Lexer.ml"
9 TARGETS="\
10 camlp4/Camlp4/Struct/Camlp4Ast.ml \
11 camlp4/boot/Camlp4.ml \
12 camlp4/boot/camlp4boot.ml"
14 for target in $TARGETS camlp4/boot/Camlp4Ast.ml; do
15 [ -f "$target" ] && mv "$target" "$target.old"
16 rm -f "_build/$target"
17 done
19 if [ -x ./boot/myocamlbuild.native ]; then
20 OCAMLBUILD=./boot/myocamlbuild.native
21 else
22 OCAMLBUILD="./boot/ocamlrun boot/myocamlbuild"
24 $OCAMLBUILD $TMPTARGETS $TARGETS
26 for t in $TARGETS; do
27 echo promote $t
28 cp _build/$t camlp4/boot/`basename $t`
29 if cmp _build/$t camlp4/boot/`basename $t`.old; then
30 echo fixpoint for $t
31 else
32 echo $t is different, you should rebootstrap it by cleaning, building and call this script
34 done