]> 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>
Wed, 24 Mar 2004 02:59:28 +0000 (02:59 +0000)
committerScott James Remnant <scott@netsplit.com>
Wed, 24 Mar 2004 02:59:28 +0000 (02:59 +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.

ChangeLog
ltmain.in

index c76b9b1a4280e8275adb09158b112c366976cdf7..0d58a4d4a74114baa353d309bb2945df2c4141aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-03-24  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.
+
 2004-03-24  Scott James Remnant  <scott@netsplit.com>
 
        * ltmain.in <prog linkmode>: Always add -L options to
index fa77ab6e8e0053fb7a141a2d431ef6d0934b0290..d4da0a67975192da250a2c3a9b22a97e70f5bd9c 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -3962,7 +3962,16 @@ 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"
 
@@ -4000,14 +4009,31 @@ 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 $?
-         exit $EXIT_SUCCESS
+         $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
 
        # Create links to the real library.