summaryrefslogtreecommitdiffstats
path: root/coverity
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-11 08:34:28 +0800
committerHarald Welte <laforge@gnumonks.org>2017-10-11 08:44:23 +0800
commit34058b0856eb6127e4ba81e00effb904a2d808ee (patch)
tree760ff688ab68d9c5e647d4441e8a1c9e110b0fc9 /coverity
parent6853b7dac103c597466c6b0d0595e372fa908cf4 (diff)
coverity: Reduce codeduplication in build_Osmocom.sh
We don't need a separate build_foo function if it is identical in its body except for the 'foo' (project name). Let's clean this up. Change-Id: I27e9fc94142b42a7b7c2f9eca89056e1f90f1f0e
Diffstat (limited to 'coverity')
-rwxr-xr-xcoverity/build_Osmocom.sh112
1 files changed, 18 insertions, 94 deletions
diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh
index bccd7ea..910f810 100755
--- a/coverity/build_Osmocom.sh
+++ b/coverity/build_Osmocom.sh
@@ -22,6 +22,12 @@ do_build() {
make install
}
+build_default() {
+ pushd $1
+ do_build
+ popd
+}
+
build_layer1api() {
pushd layer1-api
install -d "$prefix/include/sysmocom/femtobts/"
@@ -29,12 +35,6 @@ build_layer1api() {
popd
}
-build_asn1c() {
- pushd asn1c
- do_build
- popd
-}
-
build_libasn1c() {
pushd libasn1c
do_build
@@ -42,39 +42,6 @@ build_libasn1c() {
popd
}
-build_osmoiuh() {
- pushd osmo-iuh
- do_build
- popd
-}
-
-build_libosmocore() {
- pushd libosmocore
-
- do_build
- popd
-}
-
-build_libosmoabis() {
- pushd libosmo-abis
-
- do_build
- popd
-}
-
-build_libosmosccp() {
- pushd libosmo-sccp
-
- do_build
- popd
-}
-
-build_osmoggsn() {
- pushd osmo-ggsn
- do_build
- popd
-}
-
build_openbsc() {
pushd openbsc/openbsc
#IU git checkout sysmocom/iu
@@ -83,12 +50,6 @@ build_openbsc() {
popd
}
-build_osmohlr() {
- pushd osmo-hlr
- do_build
- popd
-}
-
build_osmobts() {
#IU pushd openbsc/openbsc
#IU git checkout master
@@ -107,66 +68,29 @@ build_osmopcu() {
popd
}
-build_libosmodsp() {
- pushd libosmo-dsp
- do_build
- popd
-}
-
-build_libosmonetif() {
- pushd libosmo-netif
- do_build
- popd
-}
-
-build_osmogmr() {
- pushd osmo-gmr
- do_build
- popd
-}
-
-build_libsmpp34() {
- pushd libsmpp34
- do_build
- popd
-}
-
-build_osmosipconnector() {
- pushd osmo-sip-connector
- do_build
- popd
-}
-
-build_osmotrx() {
- pushd osmo-trx
- do_build
- popd
-}
-
cd "$src_dir"
rm -rf "$prefix"
build_layer1api
-build_asn1c
-build_libosmocore
+build_default asn1c
+build_default libosmocore
build_libasn1c
-build_libosmoabis
-build_libosmonetif
-build_libosmosccp
-build_libsmpp34
-build_osmoggsn
-#IU build_osmoiuh
+build_default libosmo-abis
+build_default libosmo-netif
+build_default libosmo-sccp
+build_default libsmpp34
+build_default osmo-ggsn
+#IU build_default osmo-iuh
build_osmopcu
build_osmobts
build_openbsc
-build_osmohlr
# GMR
-build_libosmodsp
-build_osmogmr
+build_default libosmo-dsp
+build_default osmo-gmr
# MNCC to SIP
-build_osmosipconnector
+build_default osmo-sip-connector
-build_osmotrx
+build_default osmo-trx