diff --git a/ChangeLog b/ChangeLog index d6c4baa8..136c7693 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-06-15 Akim Demaille + + * autoconf.sh (option handling): Give a more understandable + message when an option is missing its argument. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * autoheader.sh: Likewise. + 2000-06-13 Akim Demaille `./config.status -d' is buggy. diff --git a/autoconf.in b/autoconf.in index fec48d3e..d68c41ed 100644 --- a/autoconf.in +++ b/autoconf.in @@ -66,6 +66,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -138,8 +143,8 @@ while test $# -gt 0 ; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -147,8 +152,8 @@ while test $# -gt 0 ; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; @@ -157,9 +162,9 @@ while test $# -gt 0 ; do shift;; --trace | -t ) + test $# = 1 && eval "$exit_missing_arg" task=trace shift - test $# = 0 && { echo "$help" >&2; exit 1; } traces="$traces '"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --trace=* ) @@ -172,8 +177,8 @@ while test $# -gt 0 ; do shift;; --output | -o ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } outfile=$1 shift ;; --output=* ) @@ -181,8 +186,8 @@ while test $# -gt 0 ; do shift ;; --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; --warnings=* ) diff --git a/autoconf.sh b/autoconf.sh index fec48d3e..d68c41ed 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -66,6 +66,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -138,8 +143,8 @@ while test $# -gt 0 ; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -147,8 +152,8 @@ while test $# -gt 0 ; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; @@ -157,9 +162,9 @@ while test $# -gt 0 ; do shift;; --trace | -t ) + test $# = 1 && eval "$exit_missing_arg" task=trace shift - test $# = 0 && { echo "$help" >&2; exit 1; } traces="$traces '"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --trace=* ) @@ -172,8 +177,8 @@ while test $# -gt 0 ; do shift;; --output | -o ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } outfile=$1 shift ;; --output=* ) @@ -181,8 +186,8 @@ while test $# -gt 0 ; do shift ;; --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; --warnings=* ) diff --git a/autoheader.in b/autoheader.in index e6a6e2f8..9355584f 100644 --- a/autoheader.in +++ b/autoheader.in @@ -57,6 +57,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -104,8 +109,8 @@ while test $# -gt 0 ; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -113,14 +118,14 @@ while test $# -gt 0 ; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; --warnings=* ) diff --git a/autoheader.sh b/autoheader.sh index e6a6e2f8..9355584f 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -57,6 +57,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -104,8 +109,8 @@ while test $# -gt 0 ; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -113,14 +118,14 @@ while test $# -gt 0 ; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; --warnings=* ) diff --git a/autoreconf.in b/autoreconf.in index a5513d30..e631df66 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -57,6 +57,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -106,8 +111,8 @@ while test $# -gt 0; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -115,8 +120,8 @@ while test $# -gt 0; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; diff --git a/autoreconf.sh b/autoreconf.sh index a5513d30..e631df66 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -57,6 +57,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -106,8 +111,8 @@ while test $# -gt 0; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -115,8 +120,8 @@ while test $# -gt 0; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; diff --git a/bin/autoconf.in b/bin/autoconf.in index fec48d3e..d68c41ed 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -66,6 +66,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -138,8 +143,8 @@ while test $# -gt 0 ; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -147,8 +152,8 @@ while test $# -gt 0 ; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; @@ -157,9 +162,9 @@ while test $# -gt 0 ; do shift;; --trace | -t ) + test $# = 1 && eval "$exit_missing_arg" task=trace shift - test $# = 0 && { echo "$help" >&2; exit 1; } traces="$traces '"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --trace=* ) @@ -172,8 +177,8 @@ while test $# -gt 0 ; do shift;; --output | -o ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } outfile=$1 shift ;; --output=* ) @@ -181,8 +186,8 @@ while test $# -gt 0 ; do shift ;; --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; --warnings=* ) diff --git a/bin/autoheader.in b/bin/autoheader.in index e6a6e2f8..9355584f 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -57,6 +57,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -104,8 +109,8 @@ while test $# -gt 0 ; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -113,14 +118,14 @@ while test $# -gt 0 ; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } warnings="$warnings "`echo $1 | sed -e 's/,/ /g'` shift ;; --warnings=* ) diff --git a/bin/autoreconf.in b/bin/autoreconf.in index a5513d30..e631df66 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -57,6 +57,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help="\ Try \`$me --help' for more information." +exit_missing_arg="\ +echo \"$me: option \\\`\$1' requires an argument\" >&2 +echo \"\$help\" >&2 +exit 1" + # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). @@ -106,8 +111,8 @@ while test $# -gt 0; do localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --localdir | --l* | -l ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } localdir=$1 shift ;; @@ -115,8 +120,8 @@ while test $# -gt 0; do AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; --macrodir | --m* | -m ) + test $# = 1 && eval "$exit_missing_arg" shift - test $# = 0 && { echo "$help" >&2; exit 1; } AC_MACRODIR=$1 shift ;; diff --git a/man/autoheader.1 b/man/autoheader.1 index e3b3adae..8a00779b 100644 --- a/man/autoheader.1 +++ b/man/autoheader.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH AUTOHEADER "1" "May 2000" "GNU autoconf 2.14a" FSF +.TH AUTOHEADER "1" "June 2000" "GNU autoconf 2.14a" FSF .SH NAME autoheader \- Create a template header for configure .SH SYNOPSIS diff --git a/man/autoreconf.1 b/man/autoreconf.1 index 5dcac404..b30f0a91 100644 --- a/man/autoreconf.1 +++ b/man/autoreconf.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH AUTORECONF "1" "May 2000" "GNU autoconf 2.14a" FSF +.TH AUTORECONF "1" "June 2000" "GNU autoconf 2.14a" FSF .SH NAME autoreconf \- Update generated configuration files .SH SYNOPSIS diff --git a/man/autoupdate.1 b/man/autoupdate.1 index 171250a3..73a78ea2 100644 --- a/man/autoupdate.1 +++ b/man/autoupdate.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH AUTOUPDATE "1" "May 2000" "GNU autoconf 2.14a" FSF +.TH AUTOUPDATE "1" "June 2000" "GNU autoconf 2.14a" FSF .SH NAME autoupdate \- Update a configure.in to a newer Autoconf .SH SYNOPSIS