More arg-parsing bug fixes.
authorTom Tromey <tromey@redhat.com>
Sun, 12 Nov 1995 23:41:03 +0000 (23:41 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 12 Nov 1995 23:41:03 +0000 (23:41 +0000)
automake.in

index 0b3e729..b4a5d2e 100755 (executable)
@@ -32,6 +32,7 @@ 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
 
 mfiles=
+ok=no
 while test $# -gt 0; do
    case "$1" in
     --help | --h* )
@@ -57,7 +58,8 @@ while test $# -gt 0; do
        ;;
 
     * )
-       mfiles="$mfiles $arg"
+       mfiles="$mfiles $1"
+       ok=yes
        ;;
    esac
    shift
@@ -65,7 +67,7 @@ done
 
 # FIXME in this case, should look for Makefile.am, */Makefile.am and
 # use those.
-if test ${#mfiles} -eq 0; then
+if test "$ok" = no; then
    echo "${usage}" 1>&2
    exit 1
 fi