blob: 441c7d3b12a82d424e01d1619ff95b5fb5b2ebb0 (
plain)
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
|
#!/bin/bash
cd $(git rev-parse --show-toplevel)
echo `pwd`
sh build_posix/reconf
curdir=`pwd`
flags="CFLAGS=\"-Werror -Wall -Wextra -Waddress -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wformat-security -Wformat-nonliteral -Wformat=2 -Wmissing-declarations -Wmissing-field-initializers -Wmissing-prototypes -Wnested-externs -Wno-unused-parameter -Wpointer-arith -Wredundant-decls -Wshadow -Wundef -Wunused -Wwrite-strings -O -fno-strict-aliasing -Wuninitialized\"
CC=clang CFLAGS=\"-Wall -Werror -Qunused-arguments -Wno-self-assign -Wno-parentheses-equality -Wno-array-bounds\""
options="--enable-diagnostic
--disable-shared
--disable-static
--enable-java --enable-python
--enable-snappy --enable-zlib --enable-lz4
--with-builtins=lz4,snappy,zlib
--enable-diagnostic --enable-java --enable-python"
saved_IFS=$IFS
cr_IFS="
"
# This function may alter the current directory on failure
BuildTest() {
extra_config=--enable-silent-rules
echo "Building: $1, $2"
rm -rf ./build || return 1
mkdir build || return 1
cd ./build
eval ../configure $extra_config "$1" "$2" \
--prefix="$insdir" || return 1
eval make "$3" || return 1
make -C examples/c check VERBOSE=1 > /dev/null || return 1
case "$2" in
# Skip the install step with Python. Even with --prefix, the
# install tries to write to /usr/lib64/python2.7/site-packages .
*enable-python* ) doinstall=false;;
# Non-shared doesn't yet work: library is not found at link step (??)
*disable-shared* ) doinstall=false;;
* ) doinstall=true;;
esac
if $doinstall; then
eval make install || return 1
cflags=`pkg-config wiredtiger --cflags --libs`
[ "$1" == "CC=clang" ] && compiler="clang" || compiler="cc"
echo $compiler -o ./smoke ../examples/c/ex_smoke.c $cflags
$compiler -o ./smoke ../examples/c/ex_smoke.c $cflags|| return 1
LD_LIBRARY_PATH=$insdir/lib ./smoke || return 1
fi
return 0
}
ecode=0
insdir=`pwd`/installed
export PKG_CONFIG_PATH=$insdir/lib/pkgconfig
IFS="$cr_IFS"
for flag in $flags ; do
for option in $options ; do
cd "$curdir"
IFS="$saved_IFS"
if ! BuildTest "$flag" "$option" "$@"; then
ecode=1
echo "*** ERROR: $flag, $option"
fi
IFS="$cr_IFS"
echo hello
done
done
IFS=$saved_IFS
exit $ecode
|