File: configure

package info (click to toggle)
coq 8.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • 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 (38 lines) | stat: -rwxr-xr-x 944 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
#!/bin/sh

## This micro-configure shell script is here only to
## launch the real configuration via ocaml

ocaml=ocaml
script=./configure.ml

if [ ! -f $script ]; then
    echo "Error: file $script not found in the current directory."
    echo "Please run the configure script from the root of the coq sources."
    echo "Configuration script failed!"
    exit 1
fi

## Parse the args, only looking for -camldir
## We avoid using shift to keep "$@" intact

cmd=$ocaml
last=
for i; do
   case $last in
       -camldir) cmd="$i/$ocaml"; break;;
   esac
   last=$i
done

## We check that $cmd is ok before the real exec $cmd

`$cmd -version > /dev/null 2>&1` && exec $cmd -w "-3" $script "$@"

## If we're still here, something is wrong with $cmd

echo "Error: failed to run $cmd"
echo "Please use the option -camldir <dir> if 'ocaml' is installed"
echo "in directory <dir>, or add <dir> to your path."
echo "Configuration script failed!"
exit 1