aboutsummaryrefslogtreecommitdiff
path: root/dev/dune-dbg.in
blob: 47dfbad3a00b372e9ad3366daaba54c8bdc4c23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash

# Run in a proper install dune env.
case $1 in
    checker)
        shift
        exe=_build/default/checker/coqchk.bc
        ;;
    coqide)
        shift
        exe=_build/default/ide/coqide/coqide_main.bc
        ;;
    coqc)
        shift
        exe=_build/default/topbin/coqc_bin.bc
        ;;
    coqtop)
        shift
        exe=_build/default/topbin/coqtop_byte_bin.bc
        ;;
    *)
        echo "First argument must be one of {coqc,coqtop,checker,coqide}"
        exit 1
        ;;
esac

emacs="${INSIDE_EMACS:+-emacs}"

ocamldebug $emacs $(ocamlfind query -recursive -i-format coq.top_printers) -I +threads -I dev $exe "$@"