File: ocamldebug-coq.run

package info (click to toggle)
coq 8.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,604 kB
  • sloc: ml: 192,230; sh: 2,585; python: 2,206; ansic: 1,878; makefile: 818; lisp: 202; xml: 24; sed: 2
file content (53 lines) | stat: -rw-r--r-- 2,030 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh

# Wrapper around ocamldebug for Coq

# This file is to be launched via the generated script ocamldebug-coq,
# which will set the env variables $OCAMLDEBUG, $CAMLP5LIB, $COQTOP
# Anyway, just in case someone tries to use this script directly,
# here are some reasonable default values

[ -z "$OCAMLDEBUG" ] && OCAMLDEBUG=ocamldebug
[ -z "$CAMLP5LIB" ] && CAMLP5LIB=+camlp5
[ -z "$COQTOP" -a -d "$PWD/kernel" ] && COQTOP=$PWD
[ -z "$COQTOP" -a -d "$PWD/../kernel" ] && COQTOP=`dirname $PWD`

export CAML_LD_LIBRARY_PATH=$COQTOP/kernel/byterun:$CAML_LD_LIBRARY_PATH

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 \
	-I $COQTOP/lib -I $COQTOP/kernel -I $COQTOP/kernel/byterun \
	-I $COQTOP/library -I $COQTOP/engine \
	-I $COQTOP/pretyping -I $COQTOP/parsing -I $COQTOP/vernac \
        -I $COQTOP/interp -I $COQTOP/proofs -I $COQTOP/tactics -I $COQTOP/stm \
	-I $COQTOP/toplevel -I $COQTOP/dev -I $COQTOP/config -I $COQTOP/ltac \
        -I $COQTOP/plugins/cc         -I $COQTOP/plugins/dp \
        -I $COQTOP/plugins/extraction -I $COQTOP/plugins/field \
        -I $COQTOP/plugins/firstorder \
        -I $COQTOP/plugins/funind     -I $COQTOP/plugins/groebner \
        -I $COQTOP/plugins/interface  -I $COQTOP/plugins/micromega \
        -I $COQTOP/plugins/omega      -I $COQTOP/plugins/quote \
        -I $COQTOP/plugins/ring       -I $COQTOP/plugins/romega \
	-I $COQTOP/plugins/rtauto     -I $COQTOP/plugins/setoid_ring \
        -I $COQTOP/plugins/subtac     -I $COQTOP/plugins/syntax \
        -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