summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Huemer <alexander.huemer@xx.vu>2017-05-19 13:32:06 +0200
committerAlexander Huemer <alexander.huemer@xx.vu>2018-01-12 19:14:01 +0000
commit69350b67e6e92831efa237f73221b57146a4aa38 (patch)
tree791e3c44e051cdccb5646e870efe76266751dfa5 /scripts
parent971489df4a58b759689c0ad54b6cbaaa1768c65b (diff)
Use stow for dependency management
This commit introduces the usage of GNU stow[1] for dependency management. Stow uses symlinks to make dependencies available in a single directory althoguh they were installed in distinct directories. Keeping installation directories seperate has the advantage of letting the build fail if AM_CFLAGS and LDADD do not contain all dependencies which are actually used. Installing multiple dependencies into a single directory causes x_CFLAGS and x_LIBS variables to magically point where other dependencies are found as well, therefore missing entries can be overlooked. Stow acts as a convenience layer here, making it unnecessary to supply a list of locations in LD_LIBRARY_PATH, PKG_CONFIG_PATH and so forth for building when dependencies are installed in distinct directories manually. Stow has to be present on the jenkins build nodes for successful executing of osmo-build-dep.sh. [1] https://www.gnu.org/software/stow/ Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/osmo-build-dep.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/osmo-build-dep.sh b/scripts/osmo-build-dep.sh
index 6e9ef86..35cb373 100755
--- a/scripts/osmo-build-dep.sh
+++ b/scripts/osmo-build-dep.sh
@@ -43,6 +43,14 @@ cd "$deps"
osmo-deps.sh "$project" "$branch"
cd "$project"
+# Keep the installation targets of the dependencies in a seperate directory
+# hierarchy before stowing them to avoid wrongly suggesting that they are part
+# of the -I and -L search paths
+mkdir -p "$inst/stow"
+
autoreconf --install --force
-./configure --prefix="$inst" $cfg
+./configure --prefix="$inst/stow/$project" $cfg
$MAKE $PARALLEL_MAKE install
+
+# Make the dependencies available through symlinks in $deps ($PWD/..).
+STOW_DIR="$inst/stow" stow --restow $project