Change in osmo-ci[master]: osmo-build-dep.sh: cd into subdir before building

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Tue Mar 26 09:48:59 UTC 2019


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13413


Change subject: osmo-build-dep.sh: cd into subdir before building
......................................................................

osmo-build-dep.sh: cd into subdir before building

Support building the legacy openbsc source with osmo-build.dep.sh. This
will be used by the upcoming osmocom-build-old-tags-against-master.sh
script.

Related: OS#3765
Change-Id: I852e103e80bf295f692cf13c4cb38e80fbc19eca
---
M scripts/common.sh
M scripts/osmo-build-dep.sh
2 files changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/13/13413/1

diff --git a/scripts/common.sh b/scripts/common.sh
index 9f274d7..0a32c31 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -59,3 +59,13 @@
 	ret="$(osmo_git_last_commits_tags "$1" "$2" "$3")"
 	echo "$ret" | cut -d/ -f 3
 }
+
+# Print the subdirectory of the repository where the source lies (configure.ac etc.).
+# Print nothing when the source is in the topdir of the repository.
+osmo_source_subdir() {
+	case "$1" in
+		openbsc)
+			echo "openbsc"
+			;;
+	esac
+}
diff --git a/scripts/osmo-build-dep.sh b/scripts/osmo-build-dep.sh
index dfec9be..2e4fb31 100755
--- a/scripts/osmo-build-dep.sh
+++ b/scripts/osmo-build-dep.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+. "$(dirname "$0")/common.sh"
 
 project="$1"
 branch="$2"
@@ -48,6 +49,11 @@
 # of the -I and -L search paths
 mkdir -p "$inst/stow"
 
+subdir="$(osmo_source_subdir "$project")"
+if [ -n "$subdir" ]; then
+	cd "$subdir"
+fi
+
 autoreconf --install --force
 ./configure --prefix="$inst/stow/$project" --with-systemdsystemunitdir="$inst/stow/$project/lib/systemd/system" $cfg
 $MAKE $PARALLEL_MAKE install

-- 
To view, visit https://gerrit.osmocom.org/13413
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I852e103e80bf295f692cf13c4cb38e80fbc19eca
Gerrit-Change-Number: 13413
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190326/a6939afb/attachment.htm>


More information about the gerrit-log mailing list