libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix clean mode for HP-UX 11.31 sh.


From: Ralf Wildenhues
Subject: Fix clean mode for HP-UX 11.31 sh.
Date: Sun, 20 Jun 2010 19:19:00 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

This fixes a test failure on ia64-hp-hpux11.31 with /bin/sh, and a
couple of other systems.  Pushing to master.

The underlying issue here is that this shell's case doesn't like
parameter expansion of an empty variable within double-quotes in a case
pattern, as in

$ empty= foo=bar; case "  $foo " in *" $empty "*) echo yes;; esac
$ empty= foo=bar; case "  $foo " in *"  "*) echo yes;; esac
yes
$ empty= foo=bar; case "  $foo " in *" "$empty" "*) echo yes;; esac
yes
$ 

and I'm opting out here for the simpler, more readable alternative.

../../libtool/tests/lt_dladvise.at:385: $LIBTOOL --mode=clean rm -f 
libpreload.la
stderr:
rm: .libs/ directory
stdout:
libtool: clean: rm -f libpreload.la .libs/libpreload.a .libs/ 
.libs/libpreload.la .libs/libpreload.lai
libtool: clean: rmdir .libs >/dev/null 2>&1
../../libtool/tests/lt_dladvise.at:385: exit code was 1, expected 0
65. lt_dladvise.at:28: 65. lt_dlopenadvise library loading (lt_dladvise.at:28): 
FAILED (lt_dladvise.at:385)

Cheers,
Ralf

    Fix clean mode for HP-UX 11.31 sh.
    
    * libltdl/config/ltmain.m4sh (func_mode_uninstall): Do not try
    to match a null string in a case pattern, even with surrounding
    spaces.  Fixes `lt_dlopenadvise library loading' test.

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 548a081..7e12d29 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -8013,10 +8013,9 @@ func_mode_uninstall ()
 
          case "$mode" in
          clean)
-           case "  $library_names " in
-           # "  " in the beginning catches empty $dlname
+           case " $library_names " in
            *" $dlname "*) ;;
-           *) rmfiles="$rmfiles $odir/$dlname" ;;
+           *) test -n "$dlname" && rmfiles="$rmfiles $odir/$dlname" ;;
            esac
            test -n "$libdir" && rmfiles="$rmfiles $odir/$name $odir/${name}i"
            ;;



reply via email to

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