]> git.ipfire.org Git - thirdparty/automake.git/commit
Use WARNINGS=none to suppress warnings from autom4te runs.
authorZack Weinberg <zackw@panix.com>
Fri, 18 Sep 2020 17:40:20 +0000 (13:40 -0400)
committerZack Weinberg <zackw@panix.com>
Mon, 21 Sep 2020 18:14:44 +0000 (14:14 -0400)
commitbd09c76a76288998ce5f804bffca3c690232d1c8
treef0d7f0c0cc5896b6d55ceac88d568adb740627c3
parent22089fa6e91f944411aea174b2d5840871142d1b
Use WARNINGS=none to suppress warnings from autom4te runs.

aclocal uses autom4te in trace mode to scan configure.ac for macros whose
definition is not yet available.  It has a kludge to prevent this from
producing spurious warnings, but a cleaner, fully backward compatible, way to
get the same effect is to set WARNINGS=none in the environment and not pass
down any -W options.  (This is better than passing -Wnone on the command line
because it automatically inherits to any subprocesses started by autom4te.)

Perl’s ‘local’ feature can be used to make the enviironment variable setting
temporary, reverting to the previous value when we exit the function.

automake also runs autom4te (technically autoconf) in trace mode; warnings
from this invocation will not be *spurious*, but in the common case where
the person running automake is going to run autoconf next, they will be
duplicated.  Therefore, make the same change to automake.

* bin/aclocal.in (trace_used_macros)
* bin/automake.in (scan_autoconf_traces):
  Use “local $ENV{WARNINGS}='none'” to suppress warnings from autom4te.
bin/aclocal.in
bin/automake.in