2017-06-12 17:15:05 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-07-10 12:54:24 +00:00
|
|
|
# this is a common helper script that is shared among all BTS model
|
|
|
|
# specific helper scripts like jenkins_sysmobts.sh. You shouldn't call
|
|
|
|
# this directly, but rather indirectly via the bts-specific scripts
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v osmo-deps.sh)" ]; then
|
|
|
|
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2017-06-12 17:15:05 +00:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
base="$PWD"
|
|
|
|
deps="$base/deps"
|
|
|
|
inst="$deps/install"
|
|
|
|
|
|
|
|
export deps inst
|
|
|
|
|
2017-10-27 20:54:25 +00:00
|
|
|
osmo-clean-workspace.sh
|
|
|
|
|
2017-06-12 17:15:05 +00:00
|
|
|
mkdir -p "$deps"
|
|
|
|
|
2017-08-25 15:19:52 +00:00
|
|
|
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
|
2017-06-22 17:49:58 +00:00
|
|
|
|
|
|
|
# generic project build function, usage:
|
|
|
|
# build "PROJECT-NAME" "CONFIGURE OPTIONS"
|
|
|
|
build_bts() {
|
|
|
|
set +x
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo " =============================== $1 ==============================="
|
|
|
|
echo
|
|
|
|
set -x
|
|
|
|
|
|
|
|
cd $deps
|
2017-08-25 15:19:52 +00:00
|
|
|
osmo-deps.sh libosmocore
|
2017-06-22 17:49:58 +00:00
|
|
|
cd $base
|
|
|
|
shift
|
2018-11-30 16:08:51 +00:00
|
|
|
|
|
|
|
# Manuals: build
|
2017-10-10 11:26:33 +00:00
|
|
|
conf_flags="$*"
|
2018-11-30 16:08:51 +00:00
|
|
|
if [ "$WITH_MANUALS" = "1" ]; then
|
|
|
|
conf_flags="$conf_flags --enable-manuals"
|
|
|
|
export PATH="$inst/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
2017-06-22 17:49:58 +00:00
|
|
|
autoreconf --install --force
|
|
|
|
./configure $conf_flags
|
|
|
|
$MAKE $PARALLEL_MAKE
|
|
|
|
$MAKE check || cat-testlogs.sh
|
2020-10-12 17:43:04 +00:00
|
|
|
DISTCHECK_CONFIGURE_FLAGS="$conf_flags" $MAKE $PARALLEL_MAKE distcheck || cat-testlogs.sh
|
2018-11-30 16:08:51 +00:00
|
|
|
|
|
|
|
# Manuals: publish
|
|
|
|
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
|
|
|
$MAKE -C "$base/doc/manuals" publish
|
|
|
|
fi
|
2019-07-10 10:21:18 +00:00
|
|
|
|
2020-10-12 17:43:04 +00:00
|
|
|
$MAKE $PARALLEL_MAKE maintainer-clean
|
2017-06-22 17:49:58 +00:00
|
|
|
}
|