]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoconf.sh (option handling): Give a more understandable
authorAkim Demaille <akim@epita.fr>
Thu, 15 Jun 2000 11:33:04 +0000 (11:33 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 15 Jun 2000 11:33:04 +0000 (11:33 +0000)
message when an option is missing its argument.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoheader.sh: Likewise.

13 files changed:
ChangeLog
autoconf.in
autoconf.sh
autoheader.in
autoheader.sh
autoreconf.in
autoreconf.sh
bin/autoconf.in
bin/autoheader.in
bin/autoreconf.in
man/autoheader.1
man/autoreconf.1
man/autoupdate.1

index d6c4baa8749cee04c9f81a87142313f8147afe18..136c769353c6635191ccc643e7dda8ab62d742cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-06-15  Akim Demaille  <akim@epita.fr>
+
+       * 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  <akim@epita.fr>
 
        `./config.status -d' is buggy.
index fec48d3e980475dfc6415c6e86e7eb815fca93b5..d68c41ed521a6bed54686f440fa40bbc25cab41f 100644 (file)
@@ -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=* )
index fec48d3e980475dfc6415c6e86e7eb815fca93b5..d68c41ed521a6bed54686f440fa40bbc25cab41f 100644 (file)
@@ -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=* )
index e6a6e2f8a2ba9f76c5ab948fe7c0c0654b824f12..9355584f82b772dd4663b9542d616d11a31cd287 100644 (file)
@@ -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=* )
index e6a6e2f8a2ba9f76c5ab948fe7c0c0654b824f12..9355584f82b772dd4663b9542d616d11a31cd287 100644 (file)
@@ -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=* )
index a5513d3063cbdd4df3696b2863b853cd4434c86e..e631df66dfcefc18f67cdcea5403de30406ad78c 100644 (file)
@@ -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 ;;
 
index a5513d3063cbdd4df3696b2863b853cd4434c86e..e631df66dfcefc18f67cdcea5403de30406ad78c 100644 (file)
@@ -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 ;;
 
index fec48d3e980475dfc6415c6e86e7eb815fca93b5..d68c41ed521a6bed54686f440fa40bbc25cab41f 100644 (file)
@@ -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=* )
index e6a6e2f8a2ba9f76c5ab948fe7c0c0654b824f12..9355584f82b772dd4663b9542d616d11a31cd287 100644 (file)
@@ -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=* )
index a5513d3063cbdd4df3696b2863b853cd4434c86e..e631df66dfcefc18f67cdcea5403de30406ad78c 100644 (file)
@@ -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 ;;
 
index e3b3adae0501d9938b348c3dccbc2e94be7a2538..8a00779bae7cc3d1cd684f26cdf48dfa13365233 100644 (file)
@@ -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
index 5dcac404d63b9d0a75cfb464539544a4dac6ee8a..b30f0a9131a6c4966e6d291411ac45dc977805a3 100644 (file)
@@ -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
index 171250a3b134fdecf73e33c0b68f008f1f966af7..73a78ea22e2d8375ac1470477dac7fc0d002c604 100644 (file)
@@ -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