1995-10-24 08:37:39 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
toremove=""
|
1995-11-13 06:25:17 -08:00
|
|
|
cslargs="profiling.cmo"
|
1995-10-24 08:37:39 -07:00
|
|
|
profargs=""
|
|
|
|
|
|
|
|
while : ; do
|
|
|
|
case "$1" in
|
|
|
|
"")
|
|
|
|
break;;
|
1996-01-11 06:17:37 -08:00
|
|
|
-p)
|
1995-10-24 08:37:39 -07:00
|
|
|
profargs="$profargs -m $2"; shift;;
|
|
|
|
-I|-o|-ccopt|-cclib)
|
|
|
|
cslargs="$cslargs $1 $2"; shift;;
|
|
|
|
*.ml)
|
|
|
|
toremove="$toremove ${1}t"
|
|
|
|
cslprof -instrument $profargs $1 > ${1}t || { rm -f $toremove; exit 2; }
|
|
|
|
cslargs="$cslargs ${1}t";;
|
|
|
|
*)
|
|
|
|
cslargs="$cslargs $1";;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
1996-05-03 02:54:03 -07:00
|
|
|
ocamlc $cslargs
|
1995-10-24 08:37:39 -07:00
|
|
|
status=$?
|
|
|
|
rm -f $toremove
|
|
|
|
exit $status
|