aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/jenkins.sh103
1 files changed, 51 insertions, 52 deletions
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index bde117c0..00cf2c8f 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -2,56 +2,55 @@
set -ex
-rm -rf deps/install
-mkdir deps || true
-export LD_LIBRARY_PATH=$PWD/deps/install/lib
-cd deps
-osmo-deps.sh libosmocore
-
-cd libosmocore
-autoreconf --install --force
-./configure --prefix=$PWD/../install
-$MAKE $PARALLEL_MAKE install
-
-
-cd ../
-osmo-deps.sh libosmo-abis
-cd libosmo-abis
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
-
-cd ../
-osmo-deps.sh libosmo-netif
-cd libosmo-netif
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
-
-cd ../
-osmo-deps.sh libosmo-sccp
-cd libosmo-sccp
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
-
-cd ../
-osmo-deps.sh libsmpp34
-cd libsmpp34
-autoreconf --install --force
-./configure --prefix=$PWD/../install
-$MAKE install
-
-cd ../
-osmo-deps.sh openggsn
-cd openggsn
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
-
-cd ../../openbsc
+base="$PWD"
+deps="$base/deps"
+inst="$deps/install"
+
+mkdir "$deps" || true
+rm -rf "$inst"
+
+build_dep() {
+ project="$1"
+ branch="$2"
+ set +x
+ echo
+ echo
+ echo
+ echo " =============================== $project ==============================="
+ echo
+ set -x
+ if [ -z "$project" ]; then
+ echo "internal failure"
+ exit 1
+ fi
+ cd "$deps"
+ rm -rf "$project"
+ osmo-deps.sh "$project"
+ cd "$project"
+ if [ -n "$branch" ]; then
+ git checkout "$branch"
+ fi
+ git rev-parse HEAD
+ autoreconf --install --force
+ ./configure --prefix="$inst"
+ $MAKE $PARALLEL_MAKE install
+}
+
+build_dep libosmocore
+
+# All below builds want this PKG_CONFIG_PATH
+export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+
+build_dep libosmo-abis
+build_dep libosmo-netif
+build_dep libosmo-sccp
+PARALLEL_MAKE="" build_dep libsmpp34
+build_dep openggsn
+
+cd "$base"
+cd openbsc
autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../deps/install/lib/pkgconfig ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP --enable-vty-tests --enable-external-tests
-PKG_CONFIG_PATH=$PWD/../deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE
-PKG_CONFIG_PATH=$PWD/../deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/../deps/install/lib $MAKE check
-PKG_CONFIG_PATH=$PWD/../deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/../deps/install/lib $MAKE distcheck
+./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP --enable-vty-tests --enable-external-tests
+$MAKE $PARALLEL_MAKE
+LD_LIBRARY_PATH="$inst/lib" $MAKE check
+LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck