diff options
author | Oliver Smith <osmith@sysmocom.de> | 2019-03-25 16:57:00 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2019-03-26 10:39:13 +0100 |
commit | f8653decf5301289586d99bf99f5f2af36c67f3e (patch) | |
tree | 8f894e3bb4eac3d53d166527afb54b5acde482a1 /scripts | |
parent | 3b3a250f6b59df5c52723d5fd49e857a6d483e90 (diff) |
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
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/common.sh | 10 | ||||
-rwxr-xr-x | scripts/osmo-build-dep.sh | 6 |
2 files changed, 16 insertions, 0 deletions
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 @@ osmo_git_last_tags() { 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 @@ cd "$project" # 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 |