* doc/autoconf.texi (Invoking autom4te): Rename as...
(autom4te Invocation): this, for consistency with the other nodes.
+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/.
- 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
`--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
# The directory where autoreconf was run.
my $cwd = cwd;
+# List of warnings.
+my @warning;
## ---------- ##
{
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
$aclocal .= ' --verbose';
$libtoolize .= ' --debug';
}
+ # --warnings;
+ if (@warning)
+ {
+ $autoconf .= ' --warnings=' . join (',', @warning);
+ $autoheader .= ' --warnings=' . join (',', @warning);
+ $automake .= ' --warnings=' . join (',', @warning)
+ if `$automake --help` =~ /--warnings/;
+ }
}
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
Using @command{autom4te}
-* Invoking autom4te:: A GNU M4 wrapper
+* autom4te Invocation:: A GNU M4 wrapper
* Customizing autom4te:: Customizing the Autoconf package
Programming in M4sugar
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}]
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
@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
@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:
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}:
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
-.\" 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
.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
.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"
.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.