]> sourceware.org Git - automake.git/commitdiff
Bug fixes to argument parsing code.
authorTom Tromey <tromey@redhat.com>
Sun, 12 Nov 1995 23:35:53 +0000 (23:35 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 12 Nov 1995 23:35:53 +0000 (23:35 +0000)
automake.in

index 5513f13994f02b2fc02bf2fe623174b5dc068d81..0b3e729b8c11cbeee03fdeb3ae467ceb5f57929b 100755 (executable)
@@ -31,10 +31,9 @@ usage="Usage: automake [--help] [--version] Makefile..."
 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
 
-mlist=
-for
-do
-   case "$arg" in
+mfiles=
+while test $# -gt 0; do
+   case "$1" in
     --help | --h* )
        echo "${usage}" 1>&2
        exit 0
@@ -44,15 +43,33 @@ do
        echo "Automake version $VERSION"
        exit 0
        ;;
+
+    -- ) # Stop option processing.
+       shift
+       break
+       ;;
+
+    -*)
+       # FIXME consider "-" meaning stdin as input?
+       echo "automake: unrecognized option -- \`$1'" 1>&2
+       echo "${usage}" 1>&2
+       exit 1
+       ;;
+
+    * )
+       mfiles="$mfiles $arg"
+       ;;
    esac
+   shift
 done
 
 # FIXME in this case, should look for Makefile.am, */Makefile.am and
 # use those.
-if test $# -eq 0; then
+if test ${#mfiles} -eq 0; then
    echo "${usage}" 1>&2
    exit 1
 fi
+set $mfiles
 
 am_status=0
 
This page took 0.02845 seconds and 5 git commands to generate.