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
9. ./build_common.sh
10# Install directory prefix
11if [ -z "$PREFIX" ]; then
12    PREFIX=`mktempdir tcpslice_build`
13    echo "PREFIX set to '$PREFIX'"
14    DELETE_PREFIX=yes
15fi
16
17print_cc_version
18run_after_echo ./configure --prefix="$PREFIX"
19run_after_echo "$MAKE_BIN" -s clean
20
21# If necessary, set TCPSLICE_TAINTED here to exempt particular builds from
22# warnings. Use as specific terms as possible (e.g. some specific compiler and
23# some specific OS).
24
25[ "$TCPSLICE_TAINTED" != yes ] && CFLAGS=`cc_werr_cflags`
26run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"}
27run_after_echo ./tcpslice -h
28print_so_deps tcpslice
29run_after_echo "$MAKE_BIN" install
30run_after_echo "$MAKE_BIN" releasetar
31handle_matrix_debug
32if [ "$DELETE_PREFIX" = yes ]; then
33    run_after_echo rm -rf "$PREFIX"
34fi
35# vi: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent :
36