-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·37 lines (32 loc) · 1.08 KB
/
build.sh
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
#!/bin/sh -e
# This script runs one build with the setup environment variable CC (usually
# "gcc" or "clang").
: "${CC:=gcc}"
: "${TCPSLICE_TAINTED:=no}"
: "${MAKE_BIN:=make}"
. ./build_common.sh
# Install directory prefix
if [ -z "$PREFIX" ]; then
# shellcheck disable=SC2006
PREFIX=`mktempdir tcpslice_build`
echo "PREFIX set to '$PREFIX'"
DELETE_PREFIX=yes
fi
print_cc_version
run_after_echo ./configure --prefix="$PREFIX"
run_after_echo "$MAKE_BIN" -s clean
# If necessary, set TCPSLICE_TAINTED here to exempt particular builds from
# warnings. Use as specific terms as possible (e.g. some specific compiler and
# some specific OS).
# shellcheck disable=SC2006
[ "$TCPSLICE_TAINTED" != yes ] && CFLAGS=`cc_werr_cflags`
run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"}
run_after_echo ./tcpslice -h
print_so_deps tcpslice
run_after_echo "$MAKE_BIN" install
run_after_echo "$MAKE_BIN" releasetar
handle_matrix_debug
if [ "$DELETE_PREFIX" = yes ]; then
run_after_echo rm -rf "$PREFIX"
fi
# vi: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent :