[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master cf82f7b 6/6: Installed libgnuastro.la doesn't
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master cf82f7b 6/6: Installed libgnuastro.la doesn't have local -L dirs |
Date: |
Sat, 25 Nov 2017 11:01:00 -0500 (EST) |
branch: master
commit cf82f7b3c1aff6fc0b74b35609d7097d5cb18a66
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Installed libgnuastro.la doesn't have local -L dirs
Until now, the `libgnuastro.la' file had the the two `-L../lib' and
`-L../../lib' directories in its `dependency_libs' variable. These are only
necessary during installation. Afterwards, they can cause undefined
behavior if such directories really exist when the user uses this file
(particularly in BuildProgram).
With this commit, these two directories are removed from the installed
`libgnuastro.la' file in the end of the library installation directory.
---
lib/Makefile.am | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9e2bf3c..c549862 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -49,6 +49,7 @@ libgnuastro_la_LIBADD =
$(top_builddir)/bootstrapped/lib/libgnu.la
+
# Specify the library .c files
libgnuastro_la_SOURCES = arithmetic.c arithmetic-binary.c \
arithmetic-onlyint.c binary.c blank.c box.c checkset.c convolve.c \
@@ -60,8 +61,6 @@ libgnuastro_la_SOURCES = arithmetic.c arithmetic-binary.c
\
-
-
# Installed headers, note that we are not blindly including all `.h' files
# in the $(headersdir) directory. Some of the header files don't need to be
# installed.
@@ -150,3 +149,13 @@ gnuastro.pc: Makefile $(srcdir)/gnuastro.pc.in
'$(srcdir)/address@hidden' >> address@hidden
chmod a-w address@hidden
mv address@hidden $@
+
+
+
+
+
+# Remove the two local directories we needed during installation
+install-exec-hook:
+ $(SED) -e 's/ -L..\/lib//g' -e 's/ -L..\/..\/lib//g' \
+ $(libdir)/libgnuastro.la > libgnuastro.la_tmp
+ mv libgnuastro.la_tmp $(libdir)/libgnuastro.la
- [gnuastro-commits] master updated (00bcde6 -> cf82f7b), Mohammad Akhlaghi, 2017/11/25
- [gnuastro-commits] master ef27131 1/6: Calloc instead of malloc when reading fits keyword comments, Mohammad Akhlaghi, 2017/11/25
- [gnuastro-commits] master cf82f7b 6/6: Installed libgnuastro.la doesn't have local -L dirs,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 4fe314c 3/6: Re-write of the Quick start section for Lzip, Mohammad Akhlaghi, 2017/11/25
- [gnuastro-commits] master f43c8b1 2/6: Adding some other useful steps to the tutorial, Mohammad Akhlaghi, 2017/11/25
- [gnuastro-commits] master a8e9e46 4/6: Acknowledged the help of Madusha and Floriane, Mohammad Akhlaghi, 2017/11/25
- [gnuastro-commits] master ba0ea5b 5/6: C++ compiler check for -Qunused-arguments, Mohammad Akhlaghi, 2017/11/25