]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
options-parser: keep non-option arguments separate!
authorGary V. Vaughan <gary@gnu.org>
Wed, 10 Oct 2012 17:32:10 +0000 (00:32 +0700)
committerGary V. Vaughan <gary@gnu.org>
Fri, 12 Oct 2012 11:36:37 +0000 (18:36 +0700)
* build-aux/options-parser (func_parse_options): When there is
more than one non-option argument, "$*" forces all of them into
a single string.  Use ${1+"$@"} to set arguments correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
build-aux/options-parser

index 3c4f788ab13a69170cce7c2d81a289aafa208b5c..86d52db07ceb7a0e40b8fc1e2ee0ece51b574dc1 100644 (file)
@@ -495,7 +495,7 @@ func_parse_options ()
 
         --)           set dummy "$_G_opt" "*"; shift; break ;;
         -*)           func_fatal_help "unrecognised option: \`$_G_opt'" ;;
-        *)            set dummy "$_G_opt" "$*"; shift; break ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
       esac
     done