-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·57 lines (43 loc) · 1.1 KB
/
configure
File metadata and controls
executable file
·57 lines (43 loc) · 1.1 KB
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
54
55
56
#!/bin/sh
set -e
COMPCERT=compcert
# Process arguments
while [ $# -gt 0 ]; do
case "$1" in
-nocompcert)
COMPCERT=
shift;;
*)
echo >&2 "Usage: $0 [-nocompcert]"
exit 1;;
esac
done
# Make sure the relevant submodules are available
if [ -e .git ]; then
if ! [ -e coqrel/configure ] ||
! [ "$COMPCERT" != "compcert" -o -e "$COMPCERT/configure" ]
then
git submodule init
git submodule update
fi
fi
if ! [ -e coqrel/configure ] ||
! [ -z "$COMPCERT" -o -e "$COMPCERT/configure" ]
then
echo >&2 "Coqrel and CompCert not found"
exit 1
fi
# Prepare for build
CMFLAGS=
echo >&2 "-- Configuring Coqrel"
(cd coqrel; ./configure)
# We need to build coqrel before we configure CompCertO
echo >&2 "-- Pre-building Coqrel"
(cd coqrel; make)
if [ "$COMPCERT" ]; then
echo >&2 "-- Configuring CompCert"
(cd "$COMPCERT"; ./configure -coqrel ../coqrel x86_64-linux)
CMFLAGS="-f _CoqProject.compcert"
fi
echo >&2 "-- Creating Makefile"
coq_makefile $CMFLAGS -f _CoqProject -o Makefile COMPCERT = "$COMPCERT"