[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03-autoreconf-w.patch
From: |
Akim Demaille |
Subject: |
03-autoreconf-w.patch |
Date: |
Tue, 29 Oct 2002 09:10:37 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* bin/autoreconf.in (&parse_args, $help): Support --warnings.
* doc/autoconf.texi (Invoking autom4te): Rename as...
(autom4te Invocation): this, for consistency with the other nodes.
Index: NEWS
--- NEWS Tue, 29 Oct 2002 08:19:15 +0100 akim
+++ NEWS Tue, 29 Oct 2002 08:45:34 +0100 akim
@@ -28,6 +28,8 @@
- 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: bin/autoreconf.in
--- bin/autoreconf.in Sun, 27 Oct 2002 13:35:48 +0100 akim
+++ bin/autoreconf.in Tue, 29 Oct 2002 08:42:52 +0100 akim
@@ -57,13 +57,27 @@
`--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 @@
# 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' => address@hidden,
- 'B|prepend-include=s' => address@hidden,
- 'i|install' => \$install,
- 's|symlink' => \$symlink);
+ getopt ("W|warnings=s" => address@hidden,
+ 'I|include=s' => address@hidden,
+ 'B|prepend-include=s' => address@hidden,
+ '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
@@ -177,6 +198,14 @@ sub parse_args ()
$automake .= ' --verbose';
$aclocal .= ' --verbose';
$libtoolize .= ' --debug';
+ }
+ # --warnings;
+ if (@warning)
+ {
+ $autoconf .= ' --warnings=' . join (',', @warning);
+ $autoheader .= ' --warnings=' . join (',', @warning);
+ $automake .= ' --warnings=' . join (',', @warning)
+ if `$automake --help` =~ /--warnings/;
}
}
Index: doc/autoconf.texi
--- doc/autoconf.texi Sun, 27 Oct 2002 19:17:09 +0100 akim
+++ doc/autoconf.texi Tue, 29 Oct 2002 08:45:01 +0100 akim
@@ -111,7 +111,7 @@
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 @@ @node Top
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 @@ @node autoconf Invocation
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:
-
address@hidden
-autoconf --warnings=syntax,$WARNINGS,@var{category}
address@hidden example
-
address@hidden
-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 address@hidden:@var{format}]
@@ -1250,7 +1244,7 @@ @node autoconf Invocation
The @var{format} is a regular string, with newlines if desired, and
several special escape codes. It defaults to @samp{$f:$l:$n:$%}; see
address@hidden autom4te}, for details on the @var{format}.
address@hidden Invocation}, for details on the @var{format}.
@item --initialization
@itemx -i
@@ -1398,6 +1392,46 @@ tedious: running @command{autopoint} for
@item address@hidden
@item -B @var{dir}
Prepend @var{dir} to the include path. Multiple invocations accumulate.
+
address@hidden address@hidden
address@hidden -W @var{category}
address@hidden WARNINGS
+Report the warnings related to @var{category} (which can actually be a
+comma separated list).
+
address@hidden @samp
address@hidden cross
+related to cross compilation issues.
+
address@hidden obsolete
+report the uses of obsolete constructs.
+
address@hidden portability
+portability issues
+
address@hidden syntax
+dubious syntactic constructs.
+
address@hidden all
+report all the warnings
+
address@hidden none
+report none
+
address@hidden error
+treats warnings as errors
+
address@hidden address@hidden
+disable warnings falling into @var{category}
address@hidden 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 @@ @node Using autom4te
@command{m4} itself.
@menu
-* Invoking autom4te:: A GNU M4 wrapper
+* autom4te Invocation:: A GNU M4 wrapper
* Customizing autom4te:: Customizing the Autoconf package
@end menu
address@hidden Invoking autom4te
address@hidden autom4te Invocation
@subsection Invoking @command{autom4te}
The command line arguments are modeled after M4's:
@@ -7629,10 +7663,11 @@ @node Customizing autom4te
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:
address@hidden You may use the traditional shell syntax to quote the
address@hidden
As an example, to disable Autoconf caches (@file{autom4te.cache})
globally, include the following lines in @file{~/.autom4te.cfg}:
@@ -14461,7 +14496,7 @@ @node autom4te.cache
for complex @file{configure.ac}.
This is why all these tools, instead of running directly M4, invoke
address@hidden (@pxref{Invoking autom4te}) which, while answering to
address@hidden (@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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 03-autoreconf-w.patch,
Akim Demaille <=