| •1 |
#!/usr/bin/bash |
| 2 |
# Run in a proper install dune env. |
| 3 |
|
| 4 |
opts=() |
| 5 |
while [[ $# -gt 0 ]]; do |
| 6 |
case $1 in |
| 7 |
-emacs) |
| 8 |
shift |
| 9 |
opts+=("-emacs") |
| 10 |
;; |
| 11 |
-I) |
| 12 |
shift |
| 13 |
opts+=("-I" "$1") |
| 14 |
shift |
| 15 |
;; |
| 16 |
coqchk) |
| 17 |
shift |
| 18 |
exe=_build/default/checker/coqchk.bc |
| 19 |
opts+=($(ocamlfind query -recursive -i-format rocq-runtime.checklib)) |
| 20 |
break |
| 21 |
;; |
| 22 |
rocqide) |
| 23 |
shift |
| 24 |
exe=_build/default/ide/rocqide/rocqide_main.bc |
| 25 |
break |
| 26 |
;; |
| 27 |
coqc) |
| 28 |
shift |
| 29 |
exe="_build/default/topbin/rocqworker.bc --kind=compile" |
| 30 |
break |
| 31 |
;; |
| 32 |
coqtop) |
| 33 |
shift |
| 34 |
exe=_build/default/topbin/coqtop_byte_bin.bc |
| 35 |
break |
| 36 |
;; |
| 37 |
coqnative) |
| 38 |
shift |
| 39 |
exe=_build/default/topbin/rocqnative.bc |
| 40 |
break |
| 41 |
;; |
| 42 |
*) |
| 43 |
echo "usage: dune exec -- dev/dune-dbg [-emacs] {coqchk|rocqide|coqc|coqtop|coqdep|coqnative} coqargs" |
| 44 |
exit 1 |
| 45 |
;; |
| 46 |
esac |
| 47 |
done |
| 48 |
|
| 49 |
export ROCQLIB=$PWD/_build/install/default/lib/coq |
| 50 |
ocamldebug "${opts[@]}" $(ocamlfind query -recursive -i-format rocq-runtime.dev) $(ocamlfind query -i-format -descendants rocq-runtime.vernac) -I +threads -I dev $exe "$@" |