-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·69 lines (60 loc) · 2.28 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
#!/bin/bash
name=specrun
#find source path
if [ -z "$source_path" ]; then
source_path=`pwd`
else
source_path=`cd $source_path; pwd`
fi
spec2000=spec_cpu_2000
spec2006=cpu2006
gcc_soft_float=gcc-4.6.2
ocaml=ocaml-4.02.3
menhir=menhir-20151012
coq=coq-8.4pl6
compcert=compcert-2.5
llvm=llvm-3.6.0
cfe=cfe-3.6.0
chmod +x misc/clang32
if [ $source_path == `pwd` ]; then
#make build directory
build_dir=`pwd`/../$name-build
#mkdir -p `pwd`/../debug
mkdir -p $build_dir
config_host_mak="$source_path/config-host.mak"
config_mak="$build_dir/config.mak"
config_host_pm="$source_path/misc/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 "SPEC2000=$spec2000" >> $config_host_mak
echo "SPEC2006=$spec2006" >> $config_host_mak
echo "GCC_SOFT_FLOAT=$gcc_soft_float" >> $config_host_mak
echo "OCAML=$ocaml" >> $config_host_mak
echo "MENHIR=$menhir" >> $config_host_mak
echo "COQ=$coq" >> $config_host_mak
echo "COMPCERT=$compcert" >> $config_host_mak
echo "COMPCERT_CAPS_FIRST_FOURTH_LETTER=$compcert_caps_first_fourth_letter" >> $config_host_mak
echo "LLVM=$llvm" >> $config_host_mak
echo "CFE=$cfe" >> $config_host_mak
echo "include $source_path/config-host.mak" > $config_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 SRCDIR \"$source_path\"" >> $config_host_h
echo "#define BUILD_DIR \"$build_dir\"" >> $config_host_h
echo "#endif" >> $config_host_h
#make misc/config_host.pm
echo "our \$srcdir = \"$source_path\";" > $config_host_pm
echo "our \$build_dir = \"$build_dir\";" >> $config_host_pm
else
build_dir=`pwd`
fi
echo "1;" >> $config_host_pm;