]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoreconf.in (&parse_args, $help): Support --warnings.
authorAkim Demaille <akim@epita.fr>
Tue, 29 Oct 2002 08:09:05 +0000 (08:09 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 29 Oct 2002 08:09:05 +0000 (08:09 +0000)
* doc/autoconf.texi (Invoking autom4te): Rename as...
(autom4te Invocation): this, for consistency with the other nodes.

ChangeLog
NEWS
bin/autoreconf.in
doc/autoconf.texi
man/autoreconf.1

index cd73849ad44d4384613c8479e1a9213e10de8dc0..1b7f9b6e8be541c0f907799567b6ec5e68c704ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-10-29  Akim Demaille  <akim@epita.fr>
+
+       * bin/autoreconf.in (&parse_args, $help): Support --warnings.
+       * doc/autoconf.texi (Invoking autom4te): Rename as...
+       (autom4te Invocation): this, for consistency with the other nodes.
+
 2002-10-29  Akim Demaille  <akim@epita.fr>
 
        * lib/autom4te.in (Autoconf): s/automate/autom4te/.
diff --git a/NEWS b/NEWS
index 75e70dc2ea8d7979606c8a86aad842dd5da51241..c23e93c33c7e8c5f7f71c9c19e6c20c3eb732266 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ Release tips:
 - Produces messages (when --verbose) to be understood by Emacs'
   compile mode.
 
+- Supports -W/--warnings.
+
 ** Obsolete options
 
   Support for the obsoleted options -m, --macrodir, -l, --localdir is
index bd305f74b839170926a2e62bb67518e271ff267a..0cc7338c6df5d4ecf15f246471fb156f5c8edb44 100644 (file)
@@ -57,13 +57,27 @@ running `autoreconf' remakes all of the files by giving it the
 `--force' option.
 
 Operation modes:
-  -h, --help      print this help, then exit
-  -V, --version   print version number, then exit
-  -v, --verbose   verbosely report processing
-  -d, --debug     don't remove temporary files
-  -f, --force     consider all files obsolete
-  -i, --install   copy missing auxiliary files
-  -s, --symlink   with -i, install symbolic links instead of copies
+  -h, --help               print this help, then exit
+  -V, --version            print version number, then exit
+  -v, --verbose            verbosely report processing
+  -d, --debug              don't remove temporary files
+  -f, --force              consider all files obsolete
+  -i, --install            copy missing auxiliary files
+  -s, --symlink            with -i, install symbolic links instead of copies
+  -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
+
+Warning categories include:
+  \`cross\'         cross compilation issues
+  \`obsolete\'      obsolete constructs
+  \`portability\'   portability issues
+  \`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.  Some subtools might
+support other warning types, using \`all' is encouraged.
 
 Library directories:
   -B, --prepend-include=DIR  prepend directory DIR to search path
@@ -104,6 +118,8 @@ my $symlink = 0;
 # The directory where autoreconf was run.
 my $cwd = cwd;
 
+# List of warnings.
+my @warning;
 
 
 ## ---------- ##
@@ -118,10 +134,15 @@ sub parse_args ()
 {
   my $srcdir;
 
-  getopt ('I|include=s'           => \@include,
-         'B|prepend-include=s'   => \@prepend_include,
-         'i|install'             => \$install,
-         's|symlink'             => \$symlink);
+  getopt ("W|warnings=s"         => \@warning,
+         'I|include=s'          => \@include,
+         'B|prepend-include=s'  => \@prepend_include,
+         'i|install'            => \$install,
+         's|symlink'            => \$symlink);
+
+  # Split the warnings as a list of elements instead of a list of
+  # lists.
+  @warning = map { split /,/ } @warning;
 
   # Even if the user specified a configure.ac, trim to get the
   # directory, and look for configure.ac again.  Because (i) the code
@@ -178,6 +199,14 @@ sub parse_args ()
       $aclocal    .= ' --verbose';
       $libtoolize .= ' --debug';
     }
+  # --warnings;
+  if (@warning)
+    {
+      $autoconf   .= ' --warnings=' . join (',', @warning);
+      $autoheader .= ' --warnings=' . join (',', @warning);
+      $automake   .= ' --warnings=' . join (',', @warning)
+       if `$automake --help` =~ /--warnings/;
+    }
 }
 
 
index b108addde118ca4931f156281c8c802cbfe02dc4..0412161981976f5ec3b6da87928a2eab3454b90a 100644 (file)
@@ -111,7 +111,7 @@ Software Foundation raise funds for GNU development.''
                                 Remaking multiple @command{configure} scripts
 * autoheader: (autoconf)autoheader Invocation.
                                 How to create configuration templates
-* autom4te: (autoconf)Invoking autom4te.
+* autom4te: (autoconf)autom4te Invocation.
                                 The Autoconf executables backbone
 * configure: (autoconf)configure Invocation.
                                 Configuring a package
@@ -327,7 +327,7 @@ M4 Quotation
 
 Using @command{autom4te}
 
-* Invoking autom4te::           A GNU M4 wrapper
+* autom4te Invocation::         A GNU M4 wrapper
 * Customizing autom4te::        Customizing the Autoconf package
 
 Programming in M4sugar
@@ -1221,23 +1221,17 @@ disable warnings falling into @var{category}
 
 Warnings about @samp{syntax} are enabled by default, and the environment
 variable @code{WARNINGS}, a comma separated list of categories, is
-honored.  @samp{autoconf -W @var{category}} will actually
-behave as if you had run:
-
-@example
-autoconf --warnings=syntax,$WARNINGS,@var{category}
-@end example
-
-@noindent
-If you want to disable @command{autoconf}'s defaults and @code{WARNINGS},
-but (for example) enable the warnings about obsolete constructs, you
-would use @option{-W none,obsolete}.
+honored.  Passing @samp{-W @var{category}} will actually behave as if
+you had passed @samp{--warnings=syntax,$WARNINGS,@var{category}}.  If
+you want to disable the defaults and @code{WARNINGS}, but (for example)
+enable the warnings about obsolete constructs, you would use @option{-W
+none,obsolete}.
 
 @cindex Back trace
 @cindex Macro invocation stack
 Because @command{autoconf} uses @command{autom4te} behind the scenes, it
 displays a back trace for errors, but not for warnings; if you want
-them, just pass @option{-W error}.  @xref{Invoking autom4te}, for some
+them, just pass @option{-W error}.  @xref{autom4te Invocation}, for some
 examples.
 
 @item --trace=@var{macro}[:@var{format}]
@@ -1250,7 +1244,7 @@ just make @var{format} as long as needed.
 
 The @var{format} is a regular string, with newlines if desired, and
 several special escape codes.  It defaults to @samp{$f:$l:$n:$%}; see
-@ref{Invoking autom4te}, for details on the @var{format}.
+@ref{autom4te Invocation}, for details on the @var{format}.
 
 @item --initialization
 @itemx -i
@@ -1398,6 +1392,46 @@ Append @var{dir} to the include path.  Multiple invocations accumulate.
 @item --prepend-include=@var{dir}
 @item -B @var{dir}
 Prepend @var{dir} to the include path.  Multiple invocations accumulate.
+
+@item --warnings=@var{category}
+@itemx -W @var{category}
+@evindex WARNINGS
+Report the warnings related to @var{category} (which can actually be a
+comma separated list).
+
+@table @samp
+@item cross
+related to cross compilation issues.
+
+@item obsolete
+report the uses of obsolete constructs.
+
+@item portability
+portability issues
+
+@item syntax
+dubious syntactic constructs.
+
+@item all
+report all the warnings
+
+@item none
+report none
+
+@item error
+treats warnings as errors
+
+@item no-@var{category}
+disable warnings falling into @var{category}
+@end table
+
+Warnings about @samp{syntax} are enabled by default, and the environment
+variable @code{WARNINGS}, a comma separated list of categories, is
+honored.  Passing @samp{-W @var{category}} will actually behave as if
+you had passed @samp{--warnings=syntax,$WARNINGS,@var{category}}.  If
+you want to disable the defaults and @code{WARNINGS}, but (for example)
+enable the warnings about obsolete constructs, you would use @option{-W
+none,obsolete}.
 @end table
 
 
@@ -7275,11 +7309,11 @@ Yet another great name from Lars J. Aas.
 @command{m4} itself.
 
 @menu
-* Invoking autom4te::           A GNU M4 wrapper
+* autom4te Invocation::         A GNU M4 wrapper
 * Customizing autom4te::        Customizing the Autoconf package
 @end menu
 
-@node Invoking autom4te
+@node autom4te Invocation
 @subsection Invoking @command{autom4te}
 
 The command line arguments are modeled after M4's:
@@ -7629,10 +7663,11 @@ lines are ignored.  Customization is performed on a per-language basis,
 wrapped in between a @samp{begin-language: "@var{language}"},
 @samp{end-language: "@var{language}"} pair.
 
-Customizing a language stands for appending options (@pxref{Invoking
-autom4te}) to the current definition of the language.  Options, and more
-generally arguments, are introduced by @samp{args: @var{arguments}}.
-You may use the traditional shell syntax to quote the @var{arguments}.
+Customizing a language stands for appending options (@pxref{autom4te
+Invocation}) to the current definition of the language.  Options, and
+more generally arguments, are introduced by @samp{args:
+@var{arguments}}.  You may use the traditional shell syntax to quote the
+@var{arguments}.
 
 As an example, to disable Autoconf caches (@file{autom4te.cache})
 globally, include the following lines in @file{~/.autom4te.cfg}:
@@ -14461,7 +14496,7 @@ actually means to compile it with M4, which can be a very long process
 for complex @file{configure.ac}.
 
 This is why all these tools, instead of running directly M4, invoke
-@command{autom4te} (@pxref{Invoking autom4te}) which, while answering to
+@command{autom4te} (@pxref{autom4te Invocation}) which, while answering to
 a specific demand, stores additional information in
 @file{autom4te.cache} for future runs.  For instance, if you run
 @command{autoconf}, behind the scenes, @command{autom4te} will also
index f8a5ec4c1ce373561df87bbf54755d2e64cdfc1e..0b9b019be94132d1bb2bf5c912838f3a11ef8f9e 100644 (file)
@@ -1,11 +1,12 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.29.
-.TH AUTORECONF "1" "October 2002" "autoreconf 2.54c" "User Commands"
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.013.
+.TH AUTORECONF "1" "October 2002" "GNU Autoconf 2.54c" FSF
 .SH NAME
-autoreconf \- Update generated configuration files
+autoreconf \- manual page for autoreconf 2.54c
 .SH SYNOPSIS
 .B autoreconf
 [\fIOPTION\fR] ... [\fICONFIGURE-AC or DIRECTORY\fR] ...
 .SH DESCRIPTION
+.PP
 Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
 (formerly `gettextize'), and `libtoolize' where appropriate)
 repeatedly to remake the GNU Build System files in the DIRECTORIES or
@@ -37,6 +38,37 @@ copy missing auxiliary files
 .TP
 \fB\-s\fR, \fB\-\-symlink\fR
 with \fB\-i\fR, install symbolic links instead of copies
+.TP
+\fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR
+report the warnings falling in CATEGORY [syntax]
+.SS "Warning categories include:"
+.TP
+`cross'
+cross compilation issues
+.TP
+`obsolete'
+obsolete constructs
+.TP
+`portability'
+portability issues
+.TP
+`syntax'
+dubious syntactic constructs
+.TP
+`all'
+all the warnings
+.TP
+`no-CATEGORY'
+turn off the warnings on CATEGORY
+.TP
+`none'
+turn off all the warnings
+.TP
+`error'
+warnings are error
+.PP
+The environment variable `WARNINGS' is honored.  Some subtools might
+support other warning types, using `all' is encouraged.
 .SS "Library directories:"
 .TP
 \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR
@@ -47,12 +79,6 @@ append directory DIR to search path
 .PP
 The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
 AUTOPOINT, LIBTOOLIZE are honored.
-.SH AUTHOR
-Written by David J. MacKenzie and Akim Demaille.
-.PP
-Copyright 2002 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 .SH "REPORTING BUGS"
 Report bugs to <bug-autoconf@gnu.org>.
 .SH "SEE ALSO"
@@ -78,3 +104,8 @@ programs are properly installed at your site, the command
 .B info autoreconf
 .PP
 should give you access to the complete manual.
+.PP
+Copyright 2002 Free Software Foundation, Inc.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.