]> The Tcpdump Group git mirrors - tcpslice/blob - build.sh
CI: Use a workaround for OpenIndiana Clang.
[tcpslice] / build.sh
1 #!/bin/sh -e
2
3 # This script runs one build with the setup environment variable CC (usually
4 # "gcc" or "clang").
5 : "${CC:=gcc}"
6 : "${TCPSLICE_TAINTED:=no}"
7 : "${MAKE_BIN:=make}"
8 # At least one OS (AIX 7) where this software can build does not have at least
9 # one command (mktemp) required for a successful run of "make releasetar".
10 : "${TEST_RELEASETAR:=yes}"
11
12 . ./build_common.sh
13 # Install directory prefix
14 if [ -z "$PREFIX" ]; then
15 PREFIX=`mktempdir tcpslice_build`
16 echo "PREFIX set to '$PREFIX'"
17 DELETE_PREFIX=yes
18 fi
19
20 print_cc_version
21 run_after_echo ./autogen.sh
22 run_after_echo ./configure --prefix="$PREFIX"
23 run_after_echo "$MAKE_BIN" -s clean
24
25 # If necessary, set TCPSLICE_TAINTED here to exempt particular builds from
26 # warnings. Use as specific terms as possible (e.g. some specific compiler and
27 # some specific OS).
28
29 [ "$TCPSLICE_TAINTED" != yes ] && CFLAGS=`cc_werr_cflags`
30
31 case `cc_id`/`os_id` in
32 clang-*/SunOS-5.11)
33 # Work around https://www.illumos.org/issues/16369
34 [ `uname -o` = illumos ] && grep -Fq OpenIndiana /etc/release && CFLAGS="-Wno-fuse-ld-path${CFLAGS:+ $CFLAGS}"
35 ;;
36 esac
37
38 run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"}
39 print_so_deps tcpslice
40 run_after_echo ./tcpslice -h
41 run_after_echo "$MAKE_BIN" install
42 [ "$TEST_RELEASETAR" = yes ] && run_after_echo "$MAKE_BIN" releasetar
43 handle_matrix_debug
44 if [ "$DELETE_PREFIX" = yes ]; then
45 run_after_echo rm -rf "$PREFIX"
46 fi
47 # vi: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent :