2001-09-07 00:55:07 -07:00
|
|
|
#!/bin/sh
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
ARGS1=
|
|
|
|
FILE=
|
|
|
|
while test "" != "$1"; do
|
|
|
|
case $1 in
|
|
|
|
*.ml*) FILE=$1;;
|
|
|
|
*) ARGS1="$ARGS1 $1";;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
head -1 $FILE >/dev/null || exit 1
|
|
|
|
|
|
|
|
set - `head -1 $FILE`
|
|
|
|
if test "$2" = "camlp4r" -o "$2" = "camlp4"; then
|
2001-09-08 00:43:33 -07:00
|
|
|
COMM="ocamlrun$EXE ../boot/$2$EXE -nolib -I ../boot"
|
2001-09-07 00:55:07 -07:00
|
|
|
if test "`basename $OTOP`" != "ocaml_stuff"; then
|
|
|
|
COMM="$OTOP/boot/$COMM"
|
|
|
|
fi
|
|
|
|
shift; shift
|
|
|
|
ARGS2=`echo $* | sed -e "s/[()*]//g"`
|
2001-11-03 05:09:26 -08:00
|
|
|
# ARGS1="$ARGS1 -verbose"
|
2002-01-09 04:11:20 -08:00
|
|
|
echo $COMM $ARGS2 $ARGS1 $FILE
|
2001-09-07 00:55:07 -07:00
|
|
|
$COMM $ARGS2 $ARGS1 $FILE
|
|
|
|
else
|
|
|
|
if test "`basename $FILE .mli`.mli" = "$FILE"; then
|
|
|
|
OFILE=`basename $FILE .mli`.ppi
|
|
|
|
else
|
|
|
|
OFILE=`basename $FILE .ml`.ppo
|
|
|
|
fi
|
2002-01-09 04:11:20 -08:00
|
|
|
echo cp $FILE $OFILE
|
2001-09-07 00:55:07 -07:00
|
|
|
cp $FILE $OFILE
|
|
|
|
fi
|