]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.m4sh (func_mode_install): Do not assume `-f'
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 8 Jul 2005 13:47:11 +0000 (13:47 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 8 Jul 2005 13:47:11 +0000 (13:47 +0000)
needs an argument if the install program is `cp'.  Cleanup
install mode somewhat.
Reported by Juergen Leising <juergen.leising@gmx.de>.

ChangeLog
config/ltmain.m4sh

index 97b92beddca200aecd7b1f2f2b4bbd67bf27cadb..32bc35d7010a2a3f9e3ebef1839f184567df320a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * config/ltmain.m4sh (func_mode_install): Do not assume `-f'
+       needs an argument if the install program is `cp'.  Cleanup
+       install mode somewhat.
+       Reported by Juergen Leising <juergen.leising@gmx.de>.
+
 2005-07-03  Thorsten Glaser  <tg@66h.42h.de>
 
        * m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Quieten configure
index 34a169afa7e82b8c2227e5ef150a1d2157aac02f..8e4d6ad1d3189c054f1025a579bd4aae842c3ee7 100644 (file)
@@ -1649,15 +1649,15 @@ func_mode_install ()
     # install_prog (especially on Windows NT).
     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
        # Allow the use of GNU shtool's install command.
-       $ECHO "X$nonopt" | $Xsed | $GREP shtool > /dev/null; then
+       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
-      arg="$1"
+      arg=$1
       shift
     else
       install_prog=
-      arg="$nonopt"
+      arg=$nonopt
     fi
 
     # The real first argument should be the name of the installation program.
@@ -1677,28 +1677,33 @@ func_mode_install ()
     do
       if test -n "$dest"; then
        files="$files $dest"
-       dest="$arg"
+       dest=$arg
        continue
       fi
 
       case $arg in
       -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
+      -f)
+       case " $install_prog " in
+       *[[\\\ /]]cp\ *) ;;
+       *) prev=$arg ;;
+       esac
+       ;;
+      -g | -m | -o)
+       prev=$arg
+       ;;
       -s)
        stripme=" -s"
        continue
        ;;
-      -*) ;;
-
+      -*)
+       ;;
       *)
        # If the previous option needed an argument, then skip it.
        if test -n "$prev"; then
          prev=
        else
-         dest="$arg"
+         dest=$arg
          continue
        fi
        ;;