aboutsummaryrefslogtreecommitdiff
path: root/dev/ocamldebug-coq.run
diff options
context:
space:
mode:
authorGaëtan Gilbert2018-04-22 15:27:22 +0200
committerGaëtan Gilbert2018-05-13 13:49:11 +0200
commitb06de08733bb01efcbb8b902fe3157b7045c8bb3 (patch)
tree799ca3cbac84c0906b0b8944093e8c4fdcf1535a /dev/ocamldebug-coq.run
parent7dd881fc72d62eb0c1f1e5063eb3a8ed268fb5d5 (diff)
Infrastructure for ocamldebug on the checker
Diffstat (limited to 'dev/ocamldebug-coq.run')
-rw-r--r--dev/ocamldebug-coq.run18
1 files changed, 17 insertions, 1 deletions
diff --git a/dev/ocamldebug-coq.run b/dev/ocamldebug-coq.run
index 8f1c165dd4..2bec09de2b 100644
--- a/dev/ocamldebug-coq.run
+++ b/dev/ocamldebug-coq.run
@@ -14,7 +14,15 @@
export CAML_LD_LIBRARY_PATH=$COQTOP/kernel/byterun:$CAML_LD_LIBRARY_PATH
-exec $OCAMLDEBUG \
+GUESS_CHECKER=
+for arg in "$@"; do
+ if [ "${arg##*/}" = coqchk.byte ]; then
+ GUESS_CHECKER=1
+ fi
+done
+
+if [ -z "$GUESS_CHECKER" ]; then
+ exec $OCAMLDEBUG \
-I $CAMLP5LIB -I +threads \
-I $COQTOP \
-I $COQTOP/config -I $COQTOP/printing -I $COQTOP/grammar -I $COQTOP/clib \
@@ -35,3 +43,11 @@ exec $OCAMLDEBUG \
-I $COQTOP/plugins/xml -I $COQTOP/plugins/ltac \
-I $COQTOP/ide \
"$@"
+else
+ exec $OCAMLDEBUG \
+ -I $CAMLP5LIB -I +threads \
+ -I $COQTOP \
+ -I $COQTOP/config -I $COQTOP/clib \
+ -I $COQTOP/lib -I $COQTOP/checker \
+ "$@"
+fi