]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
ltlibrary fix
authorTom Tromey <tromey@redhat.com>
Fri, 4 Apr 1997 02:21:13 +0000 (02:21 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 4 Apr 1997 02:21:13 +0000 (02:21 +0000)
ChangeLog
TODO
automake.in
automake.texi
lib/am/ltlibrary.am
ltlibrary.am
stamp-vti
version.texi

index cfc77e7ca483e8c6fa88c0b0ee0a05961c6798a7..86534262356a02fc7c7288d73735955f3b2ac4d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Apr  3 19:07:59 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * ltlibrary.am (@LTLIBRARY@): use @RPATH@, not explicit -rpath.
+
+       * automake.in (handle_ltlibraries): Treat EXTRA_ libraries
+       specially.
+
 Wed Apr  2 00:03:50 1997  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (handle_source_transform): Don't generate dependency
diff --git a/TODO b/TODO
index 9968d7a42631a56fd551136054b289dae04a64cc..44201d4ea0021d2f25fd107c2bb6f2eb5bb389a9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,9 +1,13 @@
 * NORMAL_INSTALL / NORMAL_UNINSTALL -vs- recursive rules
-  [ requires changes to the standard, I think ]
+  [ requires changes to the standard ]
 
 * dependency tracking doesn't work well when a file is removed
   the new code to track header dependencies exacerbates this
   what is the fix?
+  it would probably be better to use "gcc -MD" and move the .d
+  file into the .deps directory.  That is, create the dependencies
+  as a side effect of compilation
+  This still won't solve the file-deletion problem
 
 * make sure `missing' defines are generated
 
index 2ab5daecfee48cb4405c4ed9fdf18bc50b254153..6f686c87415a4a634516cad398ad39ddba2e21f6 100755 (executable)
@@ -1591,7 +1591,6 @@ sub handle_ltlibraries
            }
 
            # Get the installation directory of each library.
-           next if ($key eq 'EXTRA');
            for (&variable_value_as_list ($key . '_LTLIBRARIES'))
            {
                if ($instdirs{$_})
@@ -1668,14 +1667,24 @@ sub handle_ltlibraries
            $xlink = $linker ? $linker : 'LINK';
        }
 
+       local ($rpath);
+       if ($instdirs{$onelib} eq 'EXTRA')
+       {
+           # It's an EXTRA_ library, so we can't specify -rpath.
+           # Yuck.
+           $rpath = 's/\@RPATH\@//go;';
+       }
+       else
+       {
+           $rpath = 's/\@RPATH\@/-rpath ' . $instdirs{$onelib} . '/go;';
+       }
 
        $output_rules .=
            &file_contents_with_transform ('s/\@LTLIBRARY\@/'
                                           . $onelib . '/go;'
                                           . 's/\@XLTLIBRARY\@/'
                                           . $xlib . '/go;'
-                                          . 's/\@DIR\@/'
-                                          . $instdirs{$onelib} . '/go;'
+                                          . $rpath
                                           . 's/\@XLINK\@/' . $xlink . '/go;',
                                           'ltlibrary');
     }
index bf1b8909630dbdf50d649868078629e70305045c..3dd896edc82f268bd4ee375de16531da99cef3aa 100644 (file)
@@ -1294,6 +1294,14 @@ of extra libtool objects (@samp{.lo} files) to add to the shared
 library.  The @samp{library_LDFLAGS} variable contains any additional
 libtool flags, such as @samp{-version-info} or @samp{-static}.
 
+For libraries installed in some directory, @code{automake} will
+automatically supply the appropriate @samp{-rpath} option.  However, for
+libraries determined at configure time (and thus mentioned in
+@code{EXTRA_LTLIBRARIES}), @code{automake} does not know the eventual
+installation directory; for such libraries you must add the
+@samp{-rpath} option to the appropriate @samp{_LDFLAGS} variable by
+hand.
+
 @xref{Using Automake, Using Automake with Libtool, The Libtool Manual,
 libtool, The Libtool Manual}, for more information.
 
index dd1d8178f3ca934ba5c3302f55b67a0fced2a914..886533a7dd5b46955d9ed0ac0ad9d2045c152b1c 100644 (file)
@@ -16,4 +16,4 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 @LTLIBRARY@: $(@XLTLIBRARY@_OBJECTS) $(@XLTLIBRARY@_DEPENDENCIES)
-       $(@XLINK@) -rpath $(@DIR@dir) $(@XLTLIBRARY@_LDFLAGS) $(@XLTLIBRARY@_OBJECTS) $(@XLTLIBRARY@_LIBADD) $(LIBS)
+       $(@XLINK@) @RPATH@ $(@XLTLIBRARY@_LDFLAGS) $(@XLTLIBRARY@_OBJECTS) $(@XLTLIBRARY@_LIBADD) $(LIBS)
index dd1d8178f3ca934ba5c3302f55b67a0fced2a914..886533a7dd5b46955d9ed0ac0ad9d2045c152b1c 100644 (file)
@@ -16,4 +16,4 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 @LTLIBRARY@: $(@XLTLIBRARY@_OBJECTS) $(@XLTLIBRARY@_DEPENDENCIES)
-       $(@XLINK@) -rpath $(@DIR@dir) $(@XLTLIBRARY@_LDFLAGS) $(@XLTLIBRARY@_OBJECTS) $(@XLTLIBRARY@_LIBADD) $(LIBS)
+       $(@XLINK@) @RPATH@ $(@XLTLIBRARY@_LDFLAGS) $(@XLTLIBRARY@_OBJECTS) $(@XLTLIBRARY@_LIBADD) $(LIBS)
index 0e52250dd17e3e929d6af412ef3717ecca6500dc..b5d0341713d45f9650887d4eef1ece08a05d2c7a 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 27 March 1997
+@set UPDATED 3 April 1997
 @set EDITION 1.1n
 @set VERSION 1.1n
index 0e52250dd17e3e929d6af412ef3717ecca6500dc..b5d0341713d45f9650887d4eef1ece08a05d2c7a 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 27 March 1997
+@set UPDATED 3 April 1997
 @set EDITION 1.1n
 @set VERSION 1.1n