gnuastro-commits
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]