blob: ac7363e41d0ee8a4da0ef583af560218fae24e45 [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
31 osmo-build-dep.sh osmo-gsm-manuals
32 CONFIG="--enable-manuals"
33fi
34
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020035set +x
36echo
37echo
38echo
39echo " =============================== osmo-iuh ==============================="
40echo
41set -x
Neels Hofmeyr6458c302016-07-11 21:56:15 +020042
Holger Hans Peter Freyther64f56392016-04-27 22:06:46 +020043autoreconf --install --force
Daniel Willmannd4a0a772019-07-30 09:24:04 +020044./configure --enable-sanitize $CONFIG
Neels Hofmeyr6648fe82016-08-29 15:50:14 +020045
46# Verify that checked-in asn1 code is identical to regenerated asn1 code
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020047PATH="$inst/bin:$PATH" $MAKE $PARALLEL_MAKE -C src regen
Neels Hofmeyr6648fe82016-08-29 15:50:14 +020048
49# attempt to settle the file system
50sleep 1
51
52git status
53git diff | cat
54
55if ! git diff-files --quiet ; then
56 echo "ERROR: 'make -C src regen' does not match committed asn1 code"
57 exit 1
58fi
59
Neels Hofmeyrde0acd22016-07-11 17:10:49 +020060$MAKE $PARALLEL_MAKE
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020061$MAKE check \
Neels Hofmeyrc6db4932016-09-22 00:33:50 +020062 || cat-testlogs.sh
Neels Hofmeyrf7f17d42016-10-07 01:17:20 +020063$MAKE distcheck \
Neels Hofmeyrc6db4932016-09-22 00:33:50 +020064 || cat-testlogs.sh
Neels Hofmeyr8a257b62017-10-27 22:54:35 +020065
Daniel Willmannd4a0a772019-07-30 09:24:04 +020066if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
67 make -C "$base/doc/manuals" publish
68fi
69
70$MAKE maintainer-clean
Neels Hofmeyr8a257b62017-10-27 22:54:35 +020071osmo-clean-workspace.sh