2016-12-10 23:27:48 +00:00
|
|
|
#!/bin/sh
|
2017-07-10 13:05:03 +00:00
|
|
|
# jenkins build helper script for osmo-hlr. This is how we build on jenkins.osmocom.org
|
2018-11-28 13:57:25 +00:00
|
|
|
#
|
|
|
|
# environment variables:
|
|
|
|
# * WITH_MANUALS: build manual PDFs if set to "1"
|
|
|
|
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
|
|
|
|
#
|
2017-07-10 13:05:03 +00:00
|
|
|
|
|
|
|
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
|
|
|
|
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2016-12-10 23:27:48 +00:00
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
base="$PWD"
|
|
|
|
deps="$base/deps"
|
|
|
|
inst="$deps/install"
|
|
|
|
export deps inst
|
|
|
|
|
2017-10-27 20:54:31 +00:00
|
|
|
osmo-clean-workspace.sh
|
|
|
|
|
2016-12-10 23:27:48 +00:00
|
|
|
mkdir "$deps" || true
|
|
|
|
|
2017-08-25 15:47:42 +00:00
|
|
|
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
|
|
|
|
|
2016-12-10 23:27:48 +00:00
|
|
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
export LD_LIBRARY_PATH="$inst/lib"
|
2018-11-28 13:57:25 +00:00
|
|
|
export PATH="$inst/bin:$PATH"
|
2016-12-10 23:27:48 +00:00
|
|
|
|
|
|
|
osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
|
|
|
|
osmo-build-dep.sh libosmo-abis
|
|
|
|
|
2018-11-28 13:57:25 +00:00
|
|
|
# Additional configure options and depends
|
|
|
|
CONFIG=""
|
|
|
|
if [ "$WITH_MANUALS" = "1" ]; then
|
|
|
|
osmo-build-dep.sh osmo-gsm-manuals
|
|
|
|
CONFIG="--enable-manuals"
|
|
|
|
fi
|
|
|
|
|
2016-12-10 23:27:48 +00:00
|
|
|
set +x
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo " =============================== osmo-hlr ==============================="
|
|
|
|
echo
|
|
|
|
set -x
|
|
|
|
|
|
|
|
cd "$base"
|
|
|
|
autoreconf --install --force
|
2020-01-30 08:55:00 +00:00
|
|
|
./configure \
|
|
|
|
--enable-sanitize \
|
|
|
|
--enable-external-tests \
|
|
|
|
--enable-mslookup-client-mdns-test \
|
|
|
|
--enable-werror \
|
|
|
|
$CONFIG
|
2016-12-10 23:27:48 +00:00
|
|
|
$MAKE $PARALLEL_MAKE
|
2017-11-23 15:56:24 +00:00
|
|
|
$MAKE check || cat-testlogs.sh
|
2018-11-28 13:57:25 +00:00
|
|
|
DISTCHECK_CONFIGURE_FLAGS="$CONFIG" $MAKE distcheck || cat-testlogs.sh
|
|
|
|
|
|
|
|
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
|
|
|
make -C "$base/doc/manuals" publish
|
|
|
|
fi
|
2017-10-27 20:54:31 +00:00
|
|
|
|
2019-07-10 10:28:24 +00:00
|
|
|
$MAKE maintainer-clean
|
2017-10-27 20:54:31 +00:00
|
|
|
osmo-clean-workspace.sh
|