Index: ltmain.in =================================================================== RCS file: /home/cvs/libtool/ltmain.in,v retrieving revision 1.200.2.51 diff -u -r1.200.2.51 ltmain.in --- ltmain.in 2001/03/10 20:03:01 1.200.2.51 +++ ltmain.in 2001/03/11 17:03:51 @@ -4757,7 +4757,7 @@ echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" @@ -4933,6 +4933,8 @@ modename="$modename: $mode" rm="$nonopt" files= + rmforce= + exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. @@ -4941,6 +4943,7 @@ for arg do case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac @@ -4973,6 +4976,11 @@ esac fi + # Don't error if the file doesn't exist and rm -f was used. + if test ! -e "$file" && test "$rmforce" = yes; then + continue + fi + rmfiles="$file" case $name in @@ -4997,6 +5005,9 @@ IFS="$save_ifs" $show "$cmd" $run eval "$cmd" + if test $? != 0 && test "$rmforce" != yes; then + exit_status=1 + fi done IFS="$save_ifs" fi @@ -5009,6 +5020,9 @@ IFS="$save_ifs" $show "$cmd" $run eval "$cmd" + if test $? != 0 && test "$rmforce" != yes; then + exit_status=1 + fi done IFS="$save_ifs" fi @@ -5053,7 +5067,7 @@ ;; esac $show "$rm $rmfiles" - $run $rm $rmfiles + $run $rm $rmfiles || exit_status=1 done # Try to remove the ${objdir}s in the directories where we deleted files @@ -5064,7 +5078,7 @@ fi done - exit 0 + exit $exit_status ;; "")