-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-type
executable file
·68 lines (63 loc) · 1.6 KB
/
build-type
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
#!/bin/sh
#
# build-type
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
#
# usage: build-type profile [ overrides... ]
#
# Returns a build string for the given profile and overrides.
# For example, "build-type debug noassertions" returns the canonical
# build string for a debug build with assertions turned off.
#
# The default build directory for CVC4 is then (assuming a standard
# debug build):
#
# builds/`config/config.guess`/`config/build-type debug`
#
# This script is used both in CVC4's configure script and in the
# top-level Makefile when you build another profile than the
# "current" build (to see if there already was a build of that type).
#
# The overrides are as follows:
#
# staticbinary
# optimized
# proof
# debugsymbols
# assertions
# tracing
# muzzle
# coverage
# profiling
#
# Also you can specify "cln" or "gmp". If "gmp", the build dir
# contains the string "gmp". (gmp is considered the default.)
#
# Also for glpk and abc.
#
if [ $# -eq 0 ]; then
echo "usage: build-type profile [ overrides... ]" >&2
exit
fi
build_type=$1
shift
while [ $# -gt 0 ]; do
case "$1" in
cln) cln=1 ;;
gmp) ;;
no*) eval `expr "$1" : 'no\(.*\)'`=0 ;;
*) eval $1=1 ;;
esac
shift
done
build_type_suffix=
for arg in cln glpk abc staticbinary optimized proof debugsymbols statistics replay assertions tracing muzzle coverage profiling; do
if eval [ -n '"${'$arg'+set}"' ]; then
if eval [ '"${'$arg'}"' -eq 0 ]; then
build_type_suffix=$build_type_suffix-no$arg
else
build_type_suffix=$build_type_suffix-$arg
fi
fi
done
echo $build_type$build_type_suffix