2022-10-01 10:42:28 +00:00
|
|
|
#!/bin/sh -xe
|
2022-09-26 12:48:13 +00:00
|
|
|
. $(realpath common.sh)
|
2017-10-11 00:16:03 +00:00
|
|
|
BASEDIR=source-Osmocom
|
2016-09-26 23:26:14 +00:00
|
|
|
|
2023-02-01 08:34:31 +00:00
|
|
|
osmo_cmd_require sdcc
|
|
|
|
|
2022-07-13 07:30:13 +00:00
|
|
|
# How to add a new project:
|
|
|
|
# * add it to the list below
|
|
|
|
# * add it to build_Osmocom.sh
|
|
|
|
# * add it as component here:
|
|
|
|
# https://scan.coverity.com/projects/osmocom?tab=analysis_settings
|
|
|
|
|
2022-07-11 13:23:45 +00:00
|
|
|
PROJECTS="
|
|
|
|
libasn1c
|
|
|
|
libosmo-abis
|
|
|
|
libosmocore
|
|
|
|
libosmo-dsp
|
2022-08-09 21:24:30 +00:00
|
|
|
libosmo-gprs
|
2022-07-11 13:23:45 +00:00
|
|
|
libosmo-netif
|
2022-08-09 08:13:47 +00:00
|
|
|
libosmo-pfcp
|
2022-07-11 13:23:45 +00:00
|
|
|
libosmo-sccp
|
|
|
|
libsmpp34
|
|
|
|
libusrp
|
|
|
|
osmo-bsc
|
|
|
|
osmo-msc
|
|
|
|
osmo-mgw
|
|
|
|
osmo-ggsn
|
|
|
|
osmo-gbproxy
|
|
|
|
osmo-sgsn
|
|
|
|
osmo-bts
|
|
|
|
osmo-gmr
|
|
|
|
osmo-iuh
|
|
|
|
osmo-pcu
|
|
|
|
osmo-sysmon
|
|
|
|
osmo-sip-connector
|
|
|
|
osmo-trx
|
|
|
|
osmo-hlr
|
|
|
|
osmocom-bb
|
|
|
|
osmo-smlc
|
|
|
|
osmo-cbc
|
|
|
|
simtrace2
|
|
|
|
osmo-hnodeb
|
|
|
|
osmo-hnbgw
|
|
|
|
osmo-bsc-nat
|
2023-01-31 12:29:48 +00:00
|
|
|
osmo-pcap
|
|
|
|
osmo-e1d
|
|
|
|
osmo-e1-recorder
|
2023-02-01 08:14:40 +00:00
|
|
|
libgtpnl
|
2023-01-31 12:29:48 +00:00
|
|
|
osmo-upf
|
|
|
|
osmo-isdntap
|
|
|
|
osmo-uecups
|
|
|
|
osmo-remsim
|
2022-07-11 13:23:45 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
PROJECTS_DONT_BUILD_TEST="
|
|
|
|
asn1c
|
|
|
|
"
|
|
|
|
|
2022-09-26 12:42:53 +00:00
|
|
|
mkdir -p $BASEDIR
|
2017-10-11 00:16:03 +00:00
|
|
|
cd $BASEDIR
|
2016-09-26 23:26:14 +00:00
|
|
|
|
2022-07-11 13:23:45 +00:00
|
|
|
for proj in $PROJECTS $PROJECTS_DONT_BUILD_TEST; do
|
2017-10-11 00:16:03 +00:00
|
|
|
if [ -d $proj ]; then
|
2022-06-30 09:46:37 +00:00
|
|
|
if [ -z "$SRC_SKIP_FETCH" ]; then
|
2022-12-27 17:08:56 +00:00
|
|
|
(cd $proj && git fetch && git checkout -f -B master origin/master && git submodule update --recursive --remote)
|
2022-06-30 09:46:37 +00:00
|
|
|
fi
|
|
|
|
if [ -n "$SRC_CLEAN" ]; then
|
|
|
|
git -C "$proj" clean -ffxd
|
|
|
|
fi
|
2017-10-11 00:16:03 +00:00
|
|
|
else
|
2022-12-27 17:08:56 +00:00
|
|
|
git clone --recursive "$(osmo_git_clone_url "$proj")"
|
2017-10-11 00:16:03 +00:00
|
|
|
fi
|
2022-07-11 13:23:45 +00:00
|
|
|
done
|
2022-07-03 12:50:13 +00:00
|
|
|
|
2022-07-11 13:23:45 +00:00
|
|
|
# We want to compile tests, but not execute them. Using 'noinst_PROGRAMS'
|
|
|
|
# instead of 'check_PROGRAMS' allows building test binaries during 'make all'.
|
|
|
|
for proj in $PROJECTS; do
|
2022-10-04 09:59:52 +00:00
|
|
|
files="$(git -C $proj grep -l check_PROGRAMS)" || true
|
2022-07-03 12:50:13 +00:00
|
|
|
if [ -n "$files" ]; then
|
2022-07-04 09:57:31 +00:00
|
|
|
(cd $proj && sed -i "s/check_PROGRAMS/noinst_PROGRAMS/" $files)
|
2022-07-03 12:50:13 +00:00
|
|
|
fi
|
2016-09-26 23:26:14 +00:00
|
|
|
done
|
|
|
|
|
2022-06-30 09:43:50 +00:00
|
|
|
if ! [ -d layer1-api ]; then
|
2022-06-18 09:54:15 +00:00
|
|
|
git clone https://gitea.sysmocom.de/sysmo-bts/layer1-api
|
2022-06-30 09:43:50 +00:00
|
|
|
fi
|