forked from coq/coq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dune-dbg inside emacs with dune >= 3
- Loading branch information
1 parent
e435f3c
commit c4f5055
Showing
2 changed files
with
35 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Run in a proper install dune env. | ||
case $1 in | ||
coqchk) | ||
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,coqchk,coqide}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
emacs="${INSIDE_EMACS:+-emacs}" | ||
opts=() | ||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-emacs) | ||
shift | ||
opts+=("-emacs") | ||
;; | ||
coqchk) | ||
shift | ||
exe=_build/default/checker/coqchk.bc | ||
break | ||
;; | ||
coqide) | ||
shift | ||
exe=_build/default/ide/coqide/coqide_main.bc | ||
break | ||
;; | ||
coqc) | ||
shift | ||
exe=_build/default/topbin/coqc_bin.bc | ||
break | ||
;; | ||
coqtop) | ||
shift | ||
exe=_build/default/topbin/coqtop_byte_bin.bc | ||
break | ||
;; | ||
*) | ||
echo "usage: dune exec -- dev/dune-dbg [-emacs] {coqchk|coqide|coqc|coqtop} coqargs" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
ocamldebug $emacs $(ocamlfind query -recursive -i-format coq-core.top_printers) -I +threads -I dev $exe "$@" | ||
ocamldebug "${opts[@]}" $(ocamlfind query -recursive -i-format coq-core.top_printers) -I +threads -I dev $exe "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters