]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: When a library is installed, dependent on a
authorAlbert Chin-A-Young <china@thewrittenword.com>
Fri, 8 Jul 2005 15:19:56 +0000 (15:19 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 8 Jul 2005 15:19:56 +0000 (15:19 +0000)
convenience library, and it involves relinking, the object
files extracted from the convenience library are not removed
after the relink. This is a problem if you build as non-root,
install as root, then try to remove the build directory as
non-root; Clean up properly if relink fails; Change
"$realname"U to ${realname}T to be consistent.
Missing backport of 2004-03-24 patch reported against MirLibtool
by Marc Matteo <marcm@lectroid.net>.

ChangeLog
ltmain.in

index 984ce59e1c96d249622f0b2a639ab02a3f33b213..04c5434e476d7ac45d7bfd2ff63cb7235ad78d19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-07-08  Albert Chin-A-Young  <china@thewrittenword.com>
+
+       * ltmain.in: When a library is installed, dependent on a
+       convenience library, and it involves relinking, the object
+       files extracted from the convenience library are not removed
+       after the relink. This is a problem if you build as non-root,
+       install as root, then try to remove the build directory as
+       non-root; Clean up properly if relink fails; Change
+       "$realname"U to ${realname}T to be consistent.
+       Missing backport of 2004-03-24 patch reported against MirLibtool
+       by Marc Matteo <marcm@lectroid.net>.
+
 2005-07-08  Bruno Haible  <bruno@clisp.org>
 
        * libtool.m4 (postinstall_cmds) [cygwin,mingw,pw32]: Make DLL
index ee6debeaf6f59e41f226406c770b1f4be2859b1a..826716056f58bfaf0a87c20b117381b026a12a8b 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -4009,13 +4009,30 @@ EOF
          IFS="$save_ifs"
          eval cmd=\"$cmd\"
          $show "$cmd"
-         $run eval "$cmd" || exit $?
+         $run eval "$cmd" || {
+           lt_exit=$?
+
+           # Restore the uninstalled library and exit
+           if test "$mode" = relink; then
+             $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+           fi
+
+           exit $lt_exit
+         }
        done
        IFS="$save_ifs"
 
        # Restore the uninstalled library and exit
        if test "$mode" = relink; then
          $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             $show "${rm}r $gentop"
+             $run ${rm}r "$gentop"
+           fi
+         fi
+
          exit $EXIT_SUCCESS
        fi
 
@@ -5618,7 +5635,16 @@ relink_command=\"$relink_command\""
            IFS="$save_ifs"
            eval cmd=\"$cmd\"
            $show "$cmd"
-           $run eval "$cmd" || exit $?
+           $run eval "$cmd" || {
+             lt_exit=$?
+
+             # Restore the uninstalled library and exit
+             if test "$mode" = relink; then
+               $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+             fi
+
+             exit $lt_exit
+           }
          done
          IFS="$save_ifs"
        fi