[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New version of install-options patch
From: |
Jeff Dubrule |
Subject: |
New version of install-options patch |
Date: |
Thu, 18 Oct 2001 14:21:30 -0400 |
User-agent: |
Mutt/1.2.5i |
This fixes a portability problem involving a call to 'sed' in the
first patch I submitted.
(I knew I should've tested it on *all* of our platforms before
submitting it)
-jeff
------------------------
This patch allows libtool to handle the following options to install,
that it could not before:
libtool --mode=install install -svm 664 libfoo.la /usr/lib/libfoo.la
libtool --mode=install install -m664 libfoo.la /usr/lib/libfoo.la
libtool --mode=install install -svm664 libfoo.la /usr/lib/libfoo.la
--- ltmain.in.old Mon Sep 10 19:40:18 2001
+++ ltmain.in Thu Oct 18 14:14:40 2001
@@ -4014,37 +4014,65 @@
continue
fi
- case $arg in
- -d) isdir=yes ;;
- -f) prev="-f" ;;
- -g) prev="-g" ;;
- -m) prev="-m" ;;
- -o) prev="-o" ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*) ;;
+ while test -n "$arg"; do
+ case $arg in
+ -) break ;; # Jump back to the for loop
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -f*) prev="-f" ;;
+ -g) prev="-g" ;;
+ -g*) prev="-g" ;;
+ -m) prev="-m" ;;
+ -m*) prev="-m" ;;
+ -o) prev="-o" ;;
+ -o*) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ break
+ fi
+ ;;
+ esac
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest="$arg"
- continue
- fi
- ;;
- esac
+ if test -n "$prev"; then
+ this_arg="$arg"
+ if test X$arg != X$prev; then
+ # An option may have its argument jammed against it
+ arg=
+ prev=
+ fi
+ else
+ this_arg=`$echo "X$arg" | $Xsed -e 's/^-\(.\).*/-\1/'`
+ fi
- # Aesthetically quote the argument.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog $arg"
+ # Aesthetically quote the argument and add it to install_prog.
+ this_arg=`$echo "X$this_arg" | $Xsed -e "$sed_quote_subst"`
+ case $this_arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ this_arg="\"$this_arg\""
+ ;;
+ esac
+ install_prog="$install_prog $this_arg"
+
+ case $arg in
+ -*)
+ # Remove the first option of the arg, and repeat
+ arg=`$echo X$arg | $Xsed -e "s/^-./-/"`
+ ;;
+ *)
+ # This was an argument to an option.
+ break ;;
+ esac
+ done
done
if test -z "$install_prog"; then
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- New version of install-options patch,
Jeff Dubrule <=