From 7f2a5e1c2c5f4d965685e39cb74fb19f4ed67d5c Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 8 Jul 2005 13:48:28 +0000 Subject: [PATCH] * ltmain.in (install mode): Do not assume `-f' needs an argument if the install program is `cp'. Cleanup install mode somewhat. Reported by Juergen Leising . --- ChangeLog | 6 ++++++ ltmain.in | 23 +++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad794ada7..af87d5c6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-07-08 Ralf Wildenhues + + * ltmain.in (install mode): Do not assume `-f' needs an argument if + the install program is `cp'. Cleanup install mode somewhat. + Reported by Juergen Leising . + 2005-07-03 Thorsten Glaser * libtool.m4 (_LT_AC_TRY_DLOPEN_SELF): Quieten configure output diff --git a/ltmain.in b/ltmain.in index 363a1d255..ee6debeaf 100644 --- a/ltmain.in +++ b/ltmain.in @@ -5361,7 +5361,7 @@ relink_command=\"$relink_command\"" # 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. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in @@ -5374,7 +5374,7 @@ relink_command=\"$relink_command\"" shift else install_prog= - arg="$nonopt" + arg=$nonopt fi # The real first argument should be the name of the installation program. @@ -5399,28 +5399,31 @@ relink_command=\"$relink_command\"" 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 ;; -- 2.47.3