]> git.ipfire.org Git - thirdparty/autoconf.git/commit
Use WARNINGS to pass down warnings options from autoreconf.
authorZack Weinberg <zackw@panix.com>
Mon, 21 Sep 2020 21:09:22 +0000 (17:09 -0400)
committerZack Weinberg <zackw@panix.com>
Tue, 22 Sep 2020 19:46:44 +0000 (15:46 -0400)
commitedcb0925a54cc7bd96e444925aa8fa1e9294b713
tree9007a68b7a73b895833c8a0ae5cb6d1ac16c91c0
parent218cc1e49224765788aa368fe4a2e27c6652df5d
Use WARNINGS to pass down warnings options from autoreconf.

autoreconf runs a bunch of subsidiary tools, and is expected to pass
along various command-line settings, such as those controlling
warnings.  It has historically done this via the command line.
However, not all of the tools recognize the same set of command-line
warnings options.  There’s an existing check for whether aclocal and
automake understand ‘--warnings’ at all, but it currently assumes that
automake will accept the same set of warnings *categories* that
autoconf does.  This hasn’t actually been true for many years
and is known to cause problems; see the discussion starting at
<https://lists.gnu.org/archive/html/autoconf/2020-09/msg00000.html>.

Previous patches in this series (and related patches applied to
automake) have restored agreement between the current development
trunks of the two sets of tools on the set of warnings categories, but
we still need to deal with the possibility of the *installed* tools
not being in agreement.

If we use the WARNINGS environment variable to pass down warnings
options, instead of the command line, then all the tools are already
coded to ignore unknown warning categories, and this ceases to be an
issue.  And we no longer need the check for ‘--warnings’ support in
automake, either.

Also, autoreconf as well should suppress warnings from its first
invocation of autoconf, which is for tracing purposes only and may
emit spurious warnings because aclocal.m4 is not yet in place.

* bin/autoreconf.in
  ($aclocal_supports_warnings, $automake_supports_warnings): Delete.
  (@warning): Make local to sub parse_args.
  (parse_args): Do not add --warnings options to $autoconf,
  $autoheader, $aclocal, or $automake.  Instead, set $ENV{WARNINGS}
  appropriately.  No longer necessary to probe for --warnings support
  from aclocal and automake.
  (autoreconf_current_directory): Set $ENV{WARNINGS} temporarily to
  “none” when running autoconf in trace mode.  Fix typo in comment.
  Close $traces immediately after we’re done with it.

* tests/torture.at (Specific warnings options for autoreconf):
  New test.
bin/autoreconf.in
tests/torture.at