]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoconf.sh (--warnings): Catch `no-category', not `nocategory'.
authorAkim Demaille <akim@epita.fr>
Fri, 28 Jul 2000 07:41:52 +0000 (07:41 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 28 Jul 2000 07:41:52 +0000 (07:41 +0000)
* autoheader.sh: Likewise.
* acgeneral.m4 (_AC_WARNING_IFELSE): Adjust.

ChangeLog
acgeneral.m4
autoconf.in
autoconf.sh
autoheader.in
autoheader.sh
bin/autoconf.in
bin/autoheader.in
doc/autoconf.texi
lib/autoconf/general.m4
man/autoconf.1

index 9336b522fd617e36a667e403380dcddabef57be8..df37bd7e117e711de2bedbf49759e7c84616034f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-28  Akim Demaille  <akim@epita.fr>
+
+       * autoconf.sh (--warnings): Catch `no-category', not `nocategory'.
+       * autoheader.sh: Likewise.
+       * acgeneral.m4 (_AC_WARNING_IFELSE): Adjust.
+
 2000-07-28  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi (Installation Directory Variables): New
index 3e575267dd3718ddffef874901bde7d3a36e258e..a2fed1c7bb91be1e9d082a0061b445b1f517c8e5 100644 (file)
@@ -2525,11 +2525,11 @@ define([AC_WARNING_IFELSE],
 # --------------------------------------------------------------
 # Implementation of the loop described above.
 define([_AC_WARNING_IFELSE],
-[ifelse([$4],  [$1],   [$2],
-        [$4],  [all],  [$2],
-        [$4],  [],     [$3],
-        [$4],  [none], [$3],
-        [$4],  [no$1], [$3],
+[ifelse([$4],  [$1],    [$2],
+        [$4],  [all],   [$2],
+        [$4],  [],      [$3],
+        [$4],  [none],  [$3],
+        [$4],  [no-$1], [$3],
         [$0([$1], [$2], [$3], m4_shiftn(4, $@))])])
 
 
index 1a8f35ebeef7376ce21684078a11a038e52ba429..041b08783c2ded0ddc5b416f5a3a3f832f8580a4 100644 (file)
@@ -41,13 +41,13 @@ Operation modes:
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
-  \`cross'        cross compilation issues
-  \`obsolete'     obsolete constructs
-  \`syntax'       dubious syntactic constructs
-  \`all'          all the warnings
-  \`noCATEGORY'   turn off the warnings on CATEGORY
-  \`none'         turn off all the warnings
-  \`error'        warnings are error
+  \`cross'         cross compilation issues
+  \`obsolete'      obsolete constructs
+  \`syntax'        dubious syntactic constructs
+  \`all'           all the warnings
+  \`no-CATEGORY'   turn off the warnings on CATEGORY
+  \`none'          turn off all the warnings
+  \`error'         warnings are error
 
 The environment variable \`WARNINGS' is honored.
 
@@ -202,10 +202,7 @@ while test $# -gt 0 ; do
        shift
        warnings=$warnings,$1
        shift ;;
-    --warnings=* )
-       warnings=$warnings,$optarg
-       shift ;;
-    -W* ) # People are used to -Wall, -Werror etc.
+    --warnings=* | -W* )
        warnings=$warnings,$optarg
        shift ;;
 
index 1a8f35ebeef7376ce21684078a11a038e52ba429..041b08783c2ded0ddc5b416f5a3a3f832f8580a4 100644 (file)
@@ -41,13 +41,13 @@ Operation modes:
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
-  \`cross'        cross compilation issues
-  \`obsolete'     obsolete constructs
-  \`syntax'       dubious syntactic constructs
-  \`all'          all the warnings
-  \`noCATEGORY'   turn off the warnings on CATEGORY
-  \`none'         turn off all the warnings
-  \`error'        warnings are error
+  \`cross'         cross compilation issues
+  \`obsolete'      obsolete constructs
+  \`syntax'        dubious syntactic constructs
+  \`all'           all the warnings
+  \`no-CATEGORY'   turn off the warnings on CATEGORY
+  \`none'          turn off all the warnings
+  \`error'         warnings are error
 
 The environment variable \`WARNINGS' is honored.
 
@@ -202,10 +202,7 @@ while test $# -gt 0 ; do
        shift
        warnings=$warnings,$1
        shift ;;
-    --warnings=* )
-       warnings=$warnings,$optarg
-       shift ;;
-    -W* ) # People are used to -Wall, -Werror etc.
+    --warnings=* | -W* )
        warnings=$warnings,$optarg
        shift ;;
 
index efcf64f2a8432de7c4a226599650d6552ae514a2..8e15597dda5dda6955b7f53f8183a793b1812f10 100644 (file)
@@ -96,7 +96,8 @@ warning_obsolete=false
 
 # Parse command line.
 while test $# -gt 0 ; do
-  optarg=`expr "$1" : '-[^=]*=\(.*\)'`
+  optarg=`expr "$1" : '--[^=]*=\(.*\)' \| \
+               "$1" : '-.\(.*\)'`
   case $1 in
     --version | --vers* | -V )
        echo "$version" ; exit 0 ;;
@@ -140,10 +141,10 @@ while test $# -gt 0 ; do
     --warnings | -W )
        test $# = 1 && eval "$exit_missing_arg"
        shift
-       warnings="$warnings "`echo $1 | sed -e 's/,/ /g'`
+       warnings=$warnings,$1
        shift ;;
     --warnings=* | -W*)
-       warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'`
+       warnings=$warnings,$optarg
        shift ;;
 
     -- )     # Stop option processing
@@ -160,11 +161,16 @@ while test $# -gt 0 ; do
   esac
 done
 
-# Decode `$warnings'.
-for i in :$warnings
+# The warnings are the concatenation of 1. application's defaults
+# (here, none), 2. $WARNINGS, $3 command line options, in that order.
+_ac_warnings=
+for warning in `IFS=,; echo $WARNINGS,$warnings | tr 'A-Z' 'a-z'`
 do
-  test "$i" = : && continue
-  eval "warning_$i=:"
+  case $warning in
+  '')   continue;;
+  no-*) eval warning_`expr x$warning : 'xno-\(.*\)'`=false;;
+  *)    eval warning_$warning=:;;
+  esac
 done
 
 # Trap on 0 to stop playing with `rm'.
index efcf64f2a8432de7c4a226599650d6552ae514a2..8e15597dda5dda6955b7f53f8183a793b1812f10 100644 (file)
@@ -96,7 +96,8 @@ warning_obsolete=false
 
 # Parse command line.
 while test $# -gt 0 ; do
-  optarg=`expr "$1" : '-[^=]*=\(.*\)'`
+  optarg=`expr "$1" : '--[^=]*=\(.*\)' \| \
+               "$1" : '-.\(.*\)'`
   case $1 in
     --version | --vers* | -V )
        echo "$version" ; exit 0 ;;
@@ -140,10 +141,10 @@ while test $# -gt 0 ; do
     --warnings | -W )
        test $# = 1 && eval "$exit_missing_arg"
        shift
-       warnings="$warnings "`echo $1 | sed -e 's/,/ /g'`
+       warnings=$warnings,$1
        shift ;;
     --warnings=* | -W*)
-       warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'`
+       warnings=$warnings,$optarg
        shift ;;
 
     -- )     # Stop option processing
@@ -160,11 +161,16 @@ while test $# -gt 0 ; do
   esac
 done
 
-# Decode `$warnings'.
-for i in :$warnings
+# The warnings are the concatenation of 1. application's defaults
+# (here, none), 2. $WARNINGS, $3 command line options, in that order.
+_ac_warnings=
+for warning in `IFS=,; echo $WARNINGS,$warnings | tr 'A-Z' 'a-z'`
 do
-  test "$i" = : && continue
-  eval "warning_$i=:"
+  case $warning in
+  '')   continue;;
+  no-*) eval warning_`expr x$warning : 'xno-\(.*\)'`=false;;
+  *)    eval warning_$warning=:;;
+  esac
 done
 
 # Trap on 0 to stop playing with `rm'.
index 1a8f35ebeef7376ce21684078a11a038e52ba429..041b08783c2ded0ddc5b416f5a3a3f832f8580a4 100644 (file)
@@ -41,13 +41,13 @@ Operation modes:
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
-  \`cross'        cross compilation issues
-  \`obsolete'     obsolete constructs
-  \`syntax'       dubious syntactic constructs
-  \`all'          all the warnings
-  \`noCATEGORY'   turn off the warnings on CATEGORY
-  \`none'         turn off all the warnings
-  \`error'        warnings are error
+  \`cross'         cross compilation issues
+  \`obsolete'      obsolete constructs
+  \`syntax'        dubious syntactic constructs
+  \`all'           all the warnings
+  \`no-CATEGORY'   turn off the warnings on CATEGORY
+  \`none'          turn off all the warnings
+  \`error'         warnings are error
 
 The environment variable \`WARNINGS' is honored.
 
@@ -202,10 +202,7 @@ while test $# -gt 0 ; do
        shift
        warnings=$warnings,$1
        shift ;;
-    --warnings=* )
-       warnings=$warnings,$optarg
-       shift ;;
-    -W* ) # People are used to -Wall, -Werror etc.
+    --warnings=* | -W* )
        warnings=$warnings,$optarg
        shift ;;
 
index efcf64f2a8432de7c4a226599650d6552ae514a2..8e15597dda5dda6955b7f53f8183a793b1812f10 100644 (file)
@@ -96,7 +96,8 @@ warning_obsolete=false
 
 # Parse command line.
 while test $# -gt 0 ; do
-  optarg=`expr "$1" : '-[^=]*=\(.*\)'`
+  optarg=`expr "$1" : '--[^=]*=\(.*\)' \| \
+               "$1" : '-.\(.*\)'`
   case $1 in
     --version | --vers* | -V )
        echo "$version" ; exit 0 ;;
@@ -140,10 +141,10 @@ while test $# -gt 0 ; do
     --warnings | -W )
        test $# = 1 && eval "$exit_missing_arg"
        shift
-       warnings="$warnings "`echo $1 | sed -e 's/,/ /g'`
+       warnings=$warnings,$1
        shift ;;
     --warnings=* | -W*)
-       warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'`
+       warnings=$warnings,$optarg
        shift ;;
 
     -- )     # Stop option processing
@@ -160,11 +161,16 @@ while test $# -gt 0 ; do
   esac
 done
 
-# Decode `$warnings'.
-for i in :$warnings
+# The warnings are the concatenation of 1. application's defaults
+# (here, none), 2. $WARNINGS, $3 command line options, in that order.
+_ac_warnings=
+for warning in `IFS=,; echo $WARNINGS,$warnings | tr 'A-Z' 'a-z'`
 do
-  test "$i" = : && continue
-  eval "warning_$i=:"
+  case $warning in
+  '')   continue;;
+  no-*) eval warning_`expr x$warning : 'xno-\(.*\)'`=false;;
+  *)    eval warning_$warning=:;;
+  esac
 done
 
 # Trap on 0 to stop playing with `rm'.
index b23c1c71c6925ea63f2c5438576a7fb3181ccdf7..e08375c257e1fa942e5ec5b97e16445f792fe16e 100644 (file)
@@ -971,7 +971,7 @@ report none
 @item error
 treats warnings as errors
 
-@item no@var{category}
+@item no-@var{category}
 disable warnings falling into @var{category}
 @end table
 
@@ -2150,7 +2150,7 @@ report none
 @item error
 treats warnings as errors
 
-@item no@var{category}
+@item no-@var{category}
 disable warnings falling into @var{category}
 @end table
 
index 3e575267dd3718ddffef874901bde7d3a36e258e..a2fed1c7bb91be1e9d082a0061b445b1f517c8e5 100644 (file)
@@ -2525,11 +2525,11 @@ define([AC_WARNING_IFELSE],
 # --------------------------------------------------------------
 # Implementation of the loop described above.
 define([_AC_WARNING_IFELSE],
-[ifelse([$4],  [$1],   [$2],
-        [$4],  [all],  [$2],
-        [$4],  [],     [$3],
-        [$4],  [none], [$3],
-        [$4],  [no$1], [$3],
+[ifelse([$4],  [$1],    [$2],
+        [$4],  [all],   [$2],
+        [$4],  [],      [$3],
+        [$4],  [none],  [$3],
+        [$4],  [no-$1], [$3],
         [$0([$1], [$2], [$3], m4_shiftn(4, $@))])])
 
 
index bc26dd031bca00ea506e675190436c80a0ff3462..4400c77d90b4888348929d425308516b068a88c4 100644 (file)
@@ -48,7 +48,7 @@ dubious syntactic constructs
 `all'
 all the warnings
 .TP
-`noCATEGORY'
+`no-CATEGORY'
 turn off the warnings on CATEGORY
 .TP
 `none'