Max | 3ce7584 | 2017-08-25 17:53:00 +0200 | [diff] [blame] | 1 | #!/bin/sh |
Holger Hans Peter Freyther | 64f5639 | 2016-04-27 22:06:46 +0200 | [diff] [blame] | 2 | |
| 3 | set -ex |
| 4 | |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 5 | base="$PWD" |
| 6 | deps="$base/deps" |
| 7 | inst="$deps/install" |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 8 | export deps inst |
Holger Hans Peter Freyther | 64f5639 | 2016-04-27 22:06:46 +0200 | [diff] [blame] | 9 | |
Neels Hofmeyr | 8a257b6 | 2017-10-27 22:54:35 +0200 | [diff] [blame] | 10 | osmo-clean-workspace.sh |
| 11 | |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 12 | mkdir "$deps" || true |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 13 | |
Max | 3ce7584 | 2017-08-25 17:53:00 +0200 | [diff] [blame] | 14 | verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") |
Neels Hofmeyr | 6a840b4 | 2017-03-01 15:44:57 +0100 | [diff] [blame] | 15 | |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 16 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 17 | export LD_LIBRARY_PATH="$inst/lib" |
Daniel Willmann | d4a0a77 | 2019-07-30 09:24:04 +0200 | [diff] [blame] | 18 | export PATH="$inst/bin:$PATH" |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 19 | |
Pau Espin Pedrol | e1c01a0 | 2018-02-20 20:22:24 +0100 | [diff] [blame] | 20 | osmo-build-dep.sh libosmocore "" --disable-doxygen |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 21 | osmo-build-dep.sh libosmo-abis |
Neels Hofmeyr | e305f4d | 2017-07-05 12:52:01 +0200 | [diff] [blame] | 22 | osmo-build-dep.sh libosmo-netif |
Neels Hofmeyr | 0f88c11 | 2017-07-03 16:49:43 +0200 | [diff] [blame] | 23 | osmo-build-dep.sh libosmo-sccp |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 24 | osmo-build-dep.sh libasn1c |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 25 | |
| 26 | # the asn1c binary is used by the 'regen' target below |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 27 | osmo-build-dep.sh asn1c aper-prefix |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 28 | |
Daniel Willmann | d4a0a77 | 2019-07-30 09:24:04 +0200 | [diff] [blame] | 29 | CONFIG="" |
| 30 | if [ "$WITH_MANUALS" = "1" ]; then |
| 31 | osmo-build-dep.sh osmo-gsm-manuals |
| 32 | CONFIG="--enable-manuals" |
| 33 | fi |
| 34 | |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 35 | set +x |
| 36 | echo |
| 37 | echo |
| 38 | echo |
| 39 | echo " =============================== osmo-iuh ===============================" |
| 40 | echo |
| 41 | set -x |
Neels Hofmeyr | 6458c30 | 2016-07-11 21:56:15 +0200 | [diff] [blame] | 42 | |
Holger Hans Peter Freyther | 64f5639 | 2016-04-27 22:06:46 +0200 | [diff] [blame] | 43 | autoreconf --install --force |
Daniel Willmann | d4a0a77 | 2019-07-30 09:24:04 +0200 | [diff] [blame] | 44 | ./configure --enable-sanitize $CONFIG |
Neels Hofmeyr | 6648fe8 | 2016-08-29 15:50:14 +0200 | [diff] [blame] | 45 | |
| 46 | # Verify that checked-in asn1 code is identical to regenerated asn1 code |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 47 | PATH="$inst/bin:$PATH" $MAKE $PARALLEL_MAKE -C src regen |
Neels Hofmeyr | 6648fe8 | 2016-08-29 15:50:14 +0200 | [diff] [blame] | 48 | |
| 49 | # attempt to settle the file system |
| 50 | sleep 1 |
| 51 | |
| 52 | git status |
| 53 | git diff | cat |
| 54 | |
| 55 | if ! git diff-files --quiet ; then |
| 56 | echo "ERROR: 'make -C src regen' does not match committed asn1 code" |
| 57 | exit 1 |
| 58 | fi |
| 59 | |
Neels Hofmeyr | de0acd2 | 2016-07-11 17:10:49 +0200 | [diff] [blame] | 60 | $MAKE $PARALLEL_MAKE |
Neels Hofmeyr | f7f17d4 | 2016-10-07 01:17:20 +0200 | [diff] [blame] | 61 | $MAKE check \ |
Neels Hofmeyr | c6db493 | 2016-09-22 00:33:50 +0200 | [diff] [blame] | 62 | || cat-testlogs.sh |
Pau Espin Pedrol | 2946101 | 2020-10-12 19:26:08 +0200 | [diff] [blame^] | 63 | $MAKE $PARALLEL_MAKE distcheck \ |
Neels Hofmeyr | c6db493 | 2016-09-22 00:33:50 +0200 | [diff] [blame] | 64 | || cat-testlogs.sh |
Neels Hofmeyr | 8a257b6 | 2017-10-27 22:54:35 +0200 | [diff] [blame] | 65 | |
Daniel Willmann | d4a0a77 | 2019-07-30 09:24:04 +0200 | [diff] [blame] | 66 | if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then |
| 67 | make -C "$base/doc/manuals" publish |
| 68 | fi |
| 69 | |
Pau Espin Pedrol | 2946101 | 2020-10-12 19:26:08 +0200 | [diff] [blame^] | 70 | $MAKE $PARALLEL_MAKE maintainer-clean |
Neels Hofmeyr | 8a257b6 | 2017-10-27 22:54:35 +0200 | [diff] [blame] | 71 | osmo-clean-workspace.sh |