Debian Codegraph @

test-suite/misc/coq_environment.sh

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 #!/usr/bin/bashscip-shell filesystem . . `/usr/bin/bash`.
2
3 export COQBIN=$BIN
4 export PATH=$COQBIN:$PATH
5
6 set -e
7
8 TMP=`mktempscip-shell system . . mktemp. -d`
9 cd $TMP
10 mkdirscip-shell system . . mkdir. -p overridden/theories/Init/
11
12 mkdirscip-shell system . . mkdir. overridden/plugins
13 touchscip-shell system . . touch. overridden/theories/Init/Prelude.vo
14
15 catscip-shell system . . cat. > coq_environment.txt <<EOT
16 # we override ROCQLIB because we can
17 ROCQLIB="$TMP/overridden" # bla bla
18 ROCQRUNTIMELIB="$TMP/overridden" # bla bla
19 OCAMLFIND="$TMP/overridden"
20 FOOBAR="one more"
21 EOT
22
23 cpscip-shell system . . cp. $BIN/rocq .
24 mkdirscip-shell system . . mkdir. -p overridden/tools/
25 cpscip-shell system . . cp. $ROCQLIB/../rocq-runtime/tools/CoqMakefile.in overridden/tools/
26
27 set +e
28
29 unset ROCQLIB
30 N=`./rocq c -config | grepscip-shell system . . grep. COQLIB | grepscip-shell system . . grep. /overriddenscip-shell filesystem . . `/overridden`. | wcscip-shell system . . wc. -l`
31 if [scip-shell system . . `[`. $N -ne 1 ]; then
32 echoscip-shell system . . echo. ROCQLIB not overridden by coq_environment
33 rocq -config
34 exit 1
35 fi
36 N=`./rocq c -config | grepscip-shell system . . grep. OCAMLFIND | grepscip-shell system . . grep. /overriddenscip-shell filesystem . . `/overridden`. | wcscip-shell system . . wc. -l`
37 if [scip-shell system . . `[`. $N -ne 1 ]; then
38 echoscip-shell system . . echo. OCAMLFIND not overridden by coq_environment
39 rocq -config
40 exit 1
41 fi
42 ./rocq makefile -o CoqMakefile -R . foo > /dev/nullscip-shell filesystem . . `/dev/null`.
43 N=`grepscip-shell system . . grep. COQMF_OCAMLFIND CoqMakefile.conf | grepscip-shell system . . grep. /overriddenscip-shell filesystem . . `/overridden`. | wcscip-shell system . . wc. -l`
44 if [scip-shell system . . `[`. $N -ne 1 ]; then
45 echoscip-shell system . . echo. COQMF_OCAMLFIND not overridden by coq_environment
46 catscip-shell system . . cat. CoqMakefile.conf
47 exit 1
48 fi
49
50 mkdirscip-shell system . . mkdir. -p overridden2/theories/Init/
51
52 mkdirscip-shell system . . mkdir. overridden2/plugins
53 touchscip-shell system . . touch. overridden2/theories/Init/Prelude.vo
54
55 export ROCQLIB="$PWD/overridden2"
56 N=`./rocq c -config | grepscip-shell system . . grep. COQLIB | grepscip-shell system . . grep. overridden2 | wcscip-shell system . . wc. -l`
57 if [scip-shell system . . `[`. $N -ne 1 ]; then
58 echoscip-shell system . . echo. ROCQLIB not overridden by ROCQLIB when coq_environment present
59 rocq -config
60 exit 1
61 fi
62
63 rmscip-shell system . . rm. -rf $TMP
64 exit 0