]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
install mode: do not pass `-m $install_override_mode' to cp.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 1 Feb 2009 14:06:19 +0000 (15:06 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 1 Feb 2009 14:39:38 +0000 (15:39 +0100)
* 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.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/config/ltmain.m4sh

index 4b96593ccc120e079efa846228fbbc7b76b518f2..cddb5b5cb4a0c234e9d8d3918732c7c93d8b1645 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-02-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       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.
+
        Fix sed script portability issue in func_version.
        * libltdl/config/getopt.m4sh (func_version): Remove space in
        `/\./! {' sed command, to please HP-UX sed.
index d685d308131d401a26da7bd18c1226c36c811010..49e07c3bf445827b038558042886857cfb2619b6 100644 (file)
@@ -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