From 63629f2eafdb929e00446715e09ab0404683f0a0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 12 Nov 1995 23:25:00 +0000 Subject: [PATCH] Handle --version and --help. NLS stuff from autoconf. --- automake.in | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/automake.in b/automake.in index 7d759c0..5513f13 100755 --- a/automake.in +++ b/automake.in @@ -22,9 +22,36 @@ VERSION=@VERSION@ AM_DIR=@prefix@/share/automake +usage="Usage: automake [--help] [--version] Makefile..." + +# NLS nuisances. +# Only set `LANG' and `LC_ALL' to "C" if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +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 + --help | --h* ) + echo "${usage}" 1>&2 + exit 0 + ;; + + --version | --v* ) + echo "Automake version $VERSION" + exit 0 + ;; + esac +done + +# FIXME in this case, should look for Makefile.am, */Makefile.am and +# use those. if test $# -eq 0; then - echo "Usage: automake Makefile..." >&2 - exit 1 + echo "${usage}" 1>&2 + exit 1 fi am_status=0 -- 2.7.4