1995-10-24 08:37:39 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
1996-05-11 11:26:49 -07:00
|
|
|
compargs="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)
|
1996-05-11 11:26:49 -07:00
|
|
|
compargs="$compargs $1 $2"; shift;;
|
|
|
|
-pp)
|
|
|
|
echo 1>&2 "ocamlcp: profiling is incompatible with the -pp option"
|
|
|
|
exit 2;;
|
1995-10-24 08:37:39 -07:00
|
|
|
*)
|
1996-05-11 11:26:49 -07:00
|
|
|
compargs="$compargs $1";;
|
1995-10-24 08:37:39 -07:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
1996-05-11 11:26:49 -07:00
|
|
|
exec ocamlc -pp "ocamlprof -instrument $profargs" $compargs
|