[PATCH 03/12] Do not remove shared archive member in mode clean.

Michael Haubenwallner <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <1349192093-24173-4-git-send-email-michael.haubenwallner@salomon.at>
* build-aix/ltmain.m4sh: (func_mode_uninstall) Do not try to remove the
shared archive member (seen on AIX), but the archive file only.
---
 build-aux/ltmain.m4sh |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index 22b56a1..2e5831f 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -8771,9 +8771,18 @@ func_mode_uninstall ()
 
 	  case $opt_mode in
 	  clean)
+	    # dlname may be "archive(member)" on AIX
+	    case $dlname in
+	    *'('*')')
+	      # func_stripname does not work with '(*)',
+	      # need to pass '(member)' instead.
+	      func_stripname '' "`IFS='()'; set -- $dlname; echo \"($2)\"`" "$dlname"
+	      ;;
+	    *) func_stripname_result="$dlname" ;;
+	    esac
 	    case " $library_names " in
-	    *" $dlname "*) ;;
-	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+	    *" $func_stripname_result "*) ;;
+	    *) test -n "$func_stripname_result" && func_append rmfiles " $odir/$func_stripname_result" ;;
 	    esac
 	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
 	    ;;
-- 
1.7.3.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.