-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·76 lines (67 loc) · 2.45 KB
/
configure
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
name=smpbench
#find source path
if [ -z "$source_path" ]; then
source_path=`pwd`
else
source_path=`cd $source_path; pwd`
fi
#ocaml=ocaml-3.12.0
#ocaml=ocaml-3.12.1
ocaml=ocaml-4.02.3
crosstool=crosstool-0.43
compcert=compcert-2.5
menhir=menhir-20151012
coq=coq-8.4pl6
if [ $source_path == `pwd` ]; then
#make build directory
build_dir=`pwd`/../$name-build
config_host_mak="$source_path/config-host.mak"
config_host_pm="$source_path/config_host.pm"
compcert_caps_first_fourth_letter="$(tr '[:lower:]' '[:upper:]' <<< ${compcert:0:1})${compcert:1:3}$(tr '[:lower:]' '[:upper:]' <<< ${compcert:4:1})${compcert:5}"
#make config-host.mak
echo "# Automatically generated by configure - do not modify">$config_host_mak
echo "# Configured with: $0 $@" >> $config_host_mak
echo "NAME=$name" >> $config_host_mak
echo "SRCDIR=$source_path" >> $config_host_mak
echo "build=\$(abspath $build_dir)" >> $config_host_mak
echo "OCAML=$ocaml" >> $config_host_mak
echo "CROSSTOOL=$crosstool" >> $config_host_mak
echo "COMPCERT=$compcert" >> $config_host_mak
echo "COMPCERT_CAPS_FIRST_FOURTH_LETTER=$compcert_caps_first_fourth_letter" >> $config_host_mak
echo "MENHIR=$menhir" >> $config_host_mak
echo "COQ=$coq" >> $config_host_mak
#make config-host.h
config_host_h="$source_path/config-host.h"
echo "// Automatically generated by configure - do not modify">$config_host_h
echo "// Configured with: $0 $@" >> $config_host_h
echo "#ifndef __CONFIG_HOST_H" >> $config_host_h
echo "#define __CONFIG_HOST_H" >> $config_host_h
echo "#define BUILD_DIR \"$build_dir\"" >> $config_host_h
echo "#define SRC_DIR \"$source_path\"" >> $config_host_h
echo "#endif" >> $config_host_h
echo "our \$srcdir = \"$source_path\";" > $config_host_pm
else
build_dir=`pwd`
fi
mkdir -p $build_dir/utils
mkdir -p $build_dir/cint
mkdir -p $build_dir/svcomp
rm -f $build_dir/Makefile
config_mak="$build_dir/config.mak"
config_h="$build_dir/config.h"
config_pm="$build_dir/config.pm"
config_py="$build_dir/config.py"
echo "include $source_path/config-host.mak" > $config_mak
echo "#include \"$source_path/config-host.h\"" > $config_h
echo "1;" >> $config_host_pm;
if [ -z "$ndebug" ]; then
/bin/true
else
echo "#define NDEBUG" >> $config_h
fi
echo "our \$srcdir = \"$source_path\";" >> $config_pm;
echo "our \$build = \"$build_dir\";" >> $config_pm;
echo "1;" >> $config_pm;
echo "srcdir = \"$source_path\";" >> $config_py;
echo "build = \"$build_dir\";" >> $config_py;