aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/basic.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2021-02-12 23:49:16 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2021-02-12 23:49:16 +0000
commit152421339a3a52485d9f6c4be28aad5c58cd089c (patch)
treea3c76f6fbe5278612b07f4e777678300bb07f13f /reproduce/software/make/basic.mk
parentecbaadcc88ae38adb34e08755459318372ec13b8 (diff)
Installation: minor correction in links to system libraries
Until now when making a link to the system's 'dl' and 'pthread' libraries we were simply linking the installed location on the system (in '/usr/lib'). However, in some systems, these may themselves be links to other locations and this could cause linking problems. With this commit, we now use 'realpath' to extract the absolute address of the final file that the libraries may link to, and directly link to them. A minor cosmetic correction was also made in the build rule for CFITSIO: the long line was broken into two!
Diffstat (limited to 'reproduce/software/make/basic.mk')
-rw-r--r--reproduce/software/make/basic.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 9217ee9..efb7377 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -210,7 +210,10 @@ $(ibidir)/low-level-links: $(ibidir)/grep-$(grep-version) \
# POSIX Threads library for multi-threaded programs.
for l in dl pthread; do
if [ -f /usr/lib/lib$$l.a ]; then
- ln -sf /usr/lib/lib$$l.* $(ildir)/
+ for f in /usr/lib/lib$$l.*; do
+ ln -sf $$(realpath $$f) \
+ $$(echo $$f | sed -e's|/usr/lib|$(ildir)|')
+ done
fi
done