]> granicus.if.org Git - strace/blob - travis-build.sh
Do not include xlat/netlink_protocols.h twice
[strace] / travis-build.sh
1 #!/bin/sh -ex
2
3 case "$CC" in
4         gcc)
5                 DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-gcc-Werror"
6                 ;;
7         clang-*)
8                 # clang -mx32 fails with the following error:
9                 # clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
10                 export st_cv_mx32_runtime=no
11                 ;;
12 esac
13
14 case "${TARGET-}" in
15         x32)
16                 CC="$CC -mx32"
17                 ;;
18         x86)
19                 CC="$CC -m32"
20                 DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
21                 ;;
22 esac
23
24 case "${CHECK-}" in
25         coverage)
26                 DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-code-coverage"
27                 CFLAGS='-g -O0'
28                 CFLAGS_FOR_BUILD="$CFLAGS"
29                 export CFLAGS CFLAGS_FOR_BUILD
30                 ;;
31 esac
32
33 $CC --version
34 export CC_FOR_BUILD="$CC"
35
36 [ -z "${DISTCHECK_CONFIGURE_FLAGS-}" ] ||
37         export DISTCHECK_CONFIGURE_FLAGS
38
39 ./git-set-file-times
40 ./bootstrap
41 ./configure --enable-maintainer-mode \
42         ${DISTCHECK_CONFIGURE_FLAGS-} \
43         #
44
45 j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j=
46
47 case "${CHECK-}" in
48         coverage)
49                 make -k $j all VERBOSE=${VERBOSE-}
50                 make -k $j check VERBOSE=${VERBOSE-}
51                 codecov --gcov-args=-abcp ||:
52                 ;;
53         *)
54                 make -k $j distcheck VERBOSE=${VERBOSE-}
55                 ;;
56 esac