2020-05-06 07:15:09 +08:00
|
|
|
#!/bin/bash
|
2018-06-25 06:56:07 +08:00
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2020-05-06 07:15:09 +08:00
|
|
|
NPROC=$(nproc)
|
2018-06-25 06:56:07 +08:00
|
|
|
|
2022-02-19 06:08:46 +08:00
|
|
|
. ".github/scripts/flags-$CC.sh"
|
2018-06-25 06:56:07 +08:00
|
|
|
|
2022-02-19 06:08:46 +08:00
|
|
|
add_ld_flag -Wl,-z,defs
|
2018-06-25 06:56:07 +08:00
|
|
|
|
2022-02-19 06:08:46 +08:00
|
|
|
# Make compilation error on a warning
|
|
|
|
add_flag -Werror
|
2018-06-25 06:56:07 +08:00
|
|
|
|
2022-02-19 06:08:46 +08:00
|
|
|
add_config_flag --disable-ipv6
|
|
|
|
add_config_flag --enable-daemon
|
|
|
|
add_config_flag --with-log-level=TRACE
|
2018-06-25 06:56:07 +08:00
|
|
|
|
2022-02-19 06:08:46 +08:00
|
|
|
autoreconf -fi
|
|
|
|
mkdir -p _build
|
|
|
|
cd _build # pushd
|
|
|
|
../configure "${CONFIG_FLAGS[@]}" || (cat config.log && false)
|
|
|
|
make "-j$NPROC" -k CFLAGS="$C_FLAGS" LDFLAGS="$LD_FLAGS"
|
|
|
|
make -j50 -k distcheck DISTCHECK_CONFIGURE_FLAGS="${CONFIG_FLAGS[*]}" || (cat tox-*/_build/build/test-suite.log && false)
|
|
|
|
cd - # popd
|