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

osmith gerrit-no-reply at lists.osmocom.org
Wed Mar 27 09:26:36 UTC 2019


osmith has submitted this change and it was merged. ( 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(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  osmith: Verified



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: merged
Gerrit-Change-Id: I852e103e80bf295f692cf13c4cb38e80fbc19eca
Gerrit-Change-Number: 13413
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190327/b8aa4420/attachment.html>


More information about the gerrit-log mailing list