summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/camlp4/unmaintained/compile/compile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/camlp4/unmaintained/compile/compile.sh')
-rwxr-xr-xocaml-binary-annot/camlp4/unmaintained/compile/compile.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/ocaml-binary-annot/camlp4/unmaintained/compile/compile.sh b/ocaml-binary-annot/camlp4/unmaintained/compile/compile.sh
new file mode 100755
index 0000000000..a2f4f77321
--- /dev/null
+++ b/ocaml-binary-annot/camlp4/unmaintained/compile/compile.sh
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+
+ARGS=
+FILES=
+ENTRIES=
+while test "" != "$1"; do
+ case $1 in
+ -e)
+ shift;
+ if test "$ENTRIES" != ""; then ENTRIES="$ENTRIES; "; fi
+ ENTRIES="$ENTRIES$1";;
+ *.ml*) FILES="$FILES $1";;
+ *) ARGS="$ARGS $1";;
+ esac
+ shift
+done
+
+cat $FILES | sed -e 's/Pcaml.parse_i.*$//' > tmp.ml
+echo "Compile.entries.val := [$ENTRIES];" >> tmp.ml
+> tmp.mli
+set -x
+$OTOP/boot/ocamlrun$EXE $OTOP/boot/ocamlc -I $OTOP/boot -c tmp.mli
+$OTOP/boot/ocamlrun$EXE ../boot/camlp4boot$EXE -meta_action tmp.ml -o tmp.ppo
+$OTOP/boot/ocamlrun$EXE $OTOP/boot/ocamlc -I $OTOP/boot -I ../lib -I ../camlp4 -c -impl tmp.ppo
+rm tmp.ppo
+> tmp.null
+$OTOP/boot/ocamlrun$EXE ../camlp4/camlp4$EXE ./compile.cmo ./tmp.cmo ../etc/pr_r.cmo ../etc/pr_rp.cmo $ARGS -sep "\n\n" -impl tmp.null && rm tmp.*