libtool-patches
[Top][All Lists]
Advanced

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

A set of HP-UX related minor fixes


From: Ralf Wildenhues
Subject: A set of HP-UX related minor fixes
Date: Sun, 1 Feb 2009 15:53:07 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

I'm pushing the following patches, which are IMHO all trivial.  Each of
them was exposed when I ran the test suite on HP-UX.
1) a portability wart in the func_version sed script (documented in
   autoconf.info).
2) 'libtool --mode=install cp ...' should not be passed '-m MMM' for
   atomic mode setting.  Libraries that need the atomic setting must
   not use cp but a proper install program, but for testing purposes,
   cp should just work fine.  If the user passes '-m MMM' explicitly,
   then of course she should not be using cp either.
3) when INSTALL points to our install-sh script, override a relative
   path to it in the testsuite.
4) The sed script in install.at had a dumb typo, using & ("everything
   that was matched") instead of the intended \1 ("the first matched
   group"), which was exposed on HP-UX only.

Cheers,
Ralf

        Fix sed script portability issue in func_version.
        * libltdl/config/getopt.m4sh (func_version): Remove space in
        `/\./! {' sed command, to please HP-UX sed.

diff --git a/libltdl/config/getopt.m4sh b/libltdl/config/getopt.m4sh
index 5f20320..d0f92f6 100644
--- a/libltdl/config/getopt.m4sh
+++ b/libltdl/config/getopt.m4sh
@@ -38,7 +38,7 @@ func_version ()
 {
     $SED -n '/(C)/!b go
        :more
-       /\./! {
+       /\./!{
          N
          s/\n# //
          b more




        install mode: do not pass `-m $install_override_mode' to cp.
        * libltdl/config/ltmain.m4sh (func_mode_install): New variable
        $install_cp, factor test when `cp' is used for installation.
        Do not pass mode override to cp.  Fixes `libtool --mode=install
        cp ...' on HP-UX; cp should not be used for libraries that might
        be needed by programs invoked during the installation process.

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index d685d30..49e07c3 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1470,6 +1470,10 @@ func_mode_install ()
     func_quote_for_eval "$arg"
     install_prog="$install_prog$func_quote_for_eval_result"
     install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1492,10 +1496,9 @@ func_mode_install ()
       case $arg in
       -d) isdir=yes ;;
       -f)
-       case " $install_prog " in
-       *[\\\ /]cp\ *) ;;
-       *) prev=$arg ;;
-       esac
+       if $install_cp; then :; else
+         prev=$arg
+       fi
        ;;
       -g | -m | -o)
        prev=$arg
@@ -1537,8 +1540,10 @@ func_mode_install ()
       func_fatal_help "the \`$prev' option requires an argument"
 
     if test -n "$install_override_mode" && $no_mode; then
-      func_quote_for_eval "$install_override_mode"
-      install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
+      if $install_cp; then :; else
+       func_quote_for_eval "$install_override_mode"
+       install_shared_prog="$install_shared_prog -m 
$func_quote_for_eval_result"
+      fi
     fi
 
     if test -z "$files"; then




        Fix $INSTALL in testsuite with relative path to install-sh.
        * tests/testsuite.at: If `$INSTALL' points to in-tree
        install-sh, override a possibly-relative path to it with an
        absolute one.

diff --git a/tests/testsuite.at b/tests/testsuite.at
index 92e786e..0929849 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -52,6 +52,12 @@ else
   unset=false
 fi
 : ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
+# Fix relative paths in $INSTALL
+case $INSTALL in
+  *libltdl/config/install-sh*)
+    INSTALL=$abs_top_srcdir/libltdl/config/install-sh
+    ;;
+esac
 
 # On AIX, shared libraries remain loaded in memory after use if they
 # are world-readable, until root issues slibclean.  On NFS, this causes



        Fix sed script in install.at.
        * tests/install.at (Install tests): Fix typo in sed script,
        fixes test failure on HP-UX.

diff --git a/tests/install.at b/tests/install.at
index f77970e..1e944e5 100644
--- a/tests/install.at
+++ b/tests/install.at
@@ -1,6 +1,6 @@
 # install.at -- install mode tests             -*- Autotest -*-
 #
-#   Copyright (C) 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2008
 #
 #   This file is part of GNU Libtool.
@@ -30,7 +30,7 @@ AT_KEYWORDS([libtool])
 
 AT_CHECK([$LIBTOOL --features | grep 'enable shared libraries' || exit 77],
         [], [ignore])
-sed 's,^\(install_override_mode=\).*,&755,' < $LIBTOOL > ./libtool
+sed 's,^\(install_override_mode\)=.*,\1=755,' < $LIBTOOL > ./libtool
 LIBTOOL=./libtool
 chmod a+rx $LIBTOOL
 




reply via email to

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