blob: a3a3d4a29c1f592d326f12c0ccd1871cd4b019aa [file] [log] [blame]
Max3ce75842017-08-25 17:53:00 +02001#!/bin/sh
Holger Hans Peter Freyther64f56392016-04-27 22:06:46 +02002
3set -ex
4
Neels Hofmeyrde0acd22016-07-11 17:10:49 +02005base="$PWD"
6deps="$base/deps"
7inst="$deps/install"
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +02008export deps inst
Holger Hans Peter Freyther64f56392016-04-27 22:06:46 +02009
Neels Hofmeyr8a257b62017-10-27 22:54:35 +020010osmo-clean-workspace.sh
11
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020012mkdir "$deps" || true
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020013
Max3ce75842017-08-25 17:53:00 +020014verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
Neels Hofmeyr6a840b42017-03-01 15:44:57 +010015
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020016export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020017export LD_LIBRARY_PATH="$inst/lib"
Daniel Willmannd4a0a772019-07-30 09:24:04 +020018export PATH="$inst/bin:$PATH"
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020019
Pau Espin Pedrole1c01a02018-02-20 20:22:24 +010020osmo-build-dep.sh libosmocore "" --disable-doxygen
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020021osmo-build-dep.sh libosmo-abis
Neels Hofmeyre305f4d2017-07-05 12:52:01 +020022osmo-build-dep.sh libosmo-netif
Neels Hofmeyr0f88c112017-07-03 16:49:43 +020023osmo-build-dep.sh libosmo-sccp
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020024osmo-build-dep.sh libasn1c
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020025
26# the asn1c binary is used by the 'regen' target below
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020027osmo-build-dep.sh asn1c aper-prefix
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020028
Daniel Willmannd4a0a772019-07-30 09:24:04 +020029CONFIG=""
30if [ "$WITH_MANUALS" = "1" ]; then
Daniel Willmannd4a0a772019-07-30 09:24:04 +020031 CONFIG="--enable-manuals"
32fi
33
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020034set +x
35echo
36echo
37echo
38echo " =============================== osmo-iuh ==============================="
39echo
40set -x
Neels Hofmeyr6458c302016-07-11 21:56:15 +020041
Holger Hans Peter Freyther64f56392016-04-27 22:06:46 +020042autoreconf --install --force
Daniel Willmannd4a0a772019-07-30 09:24:04 +020043./configure --enable-sanitize $CONFIG
Neels Hofmeyr6648fe82016-08-29 15:50:14 +020044
45# Verify that checked-in asn1 code is identical to regenerated asn1 code
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020046PATH="$inst/bin:$PATH" $MAKE $PARALLEL_MAKE -C src regen
Neels Hofmeyr6648fe82016-08-29 15:50:14 +020047
48# attempt to settle the file system
49sleep 1
50
51git status
52git diff | cat
53
54if ! git diff-files --quiet ; then
55 echo "ERROR: 'make -C src regen' does not match committed asn1 code"
56 exit 1
57fi
58
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020059$MAKE $PARALLEL_MAKE
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020060$MAKE check \
Neels Hofmeyrc6db4932016-09-22 00:33:50 +020061 || cat-testlogs.sh
Pau Espin Pedrol29461012020-10-12 19:26:08 +020062$MAKE $PARALLEL_MAKE distcheck \
Neels Hofmeyrc6db4932016-09-22 00:33:50 +020063 || cat-testlogs.sh
Neels Hofmeyr8a257b62017-10-27 22:54:35 +020064
Daniel Willmannd4a0a772019-07-30 09:24:04 +020065if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
66 make -C "$base/doc/manuals" publish
67fi
68
Pau Espin Pedrol29461012020-10-12 19:26:08 +020069$MAKE $PARALLEL_MAKE maintainer-clean
Neels Hofmeyr8a257b62017-10-27 22:54:35 +020070osmo-clean-workspace.sh