As discussed in the thread starting at
<https://lists.gnu.org/archive/html/automake/2020-09/msg00001.html>,
the set of valid -W options has gotten out of sync, over the years, between
autoconf and automake.  This is a problem because autoreconf assumes all of
the tools it runs take the same set of -W options, and under some conditions
the “unknown warning category” message will be treated as a hard error.

This patchset makes the changes that I believe are appropriate on automake’s
side, in order to reconcile the two.  On autoconf’s side, I am going to have
autoreconf check the --help output for each tool it runs and only pass down
-W options that show up in the “Warning categories include:” list, as an
additional defensive measure.

Patch 1 manually merges autoconf’s ChannelDefs.pm back into automake’s
ChannelDefs.pm; after this patch is committed I will add ChannelDefs.pm
to the set of files that are automatically copied almost-verbatim from
automake into autoconf.

Patch 2 changes the semantics of -Werror so that the “unknown warning
category” message is *never* treated as a hard error.  This is future-
proofing against the scenario where the *installed* version of autoconf
knows more warning categories than the installed version of automake does.

Patch 3 switches all of the Perl code over from ‘use vars’ to ‘our’,
which is preferred since Perl 5.6.0 (conveniently the oldest supported
version).  This doesn’t have anything to do with the other changes, but
I want to make the same change on autoconf’s side, so it needs to happen in
the .pm files belonging to automake first.

Patch 4 fixes a glitch in the testsuite that I noticed while testing the above
changes.

OK to commit?

zw

-- 
Zack Weinberg (4):
  Sync ChannelDefs.pm from autoconf.
  Consistently process -W(no-)error after all other warning options.
  Consistently use ‘our’ instead of ‘use vars’.
  t/python-virtualenv.sh: Skip when versions don’t match

 bin/aclocal.in                 |  14 ++--
 bin/automake.in                |   7 +-
 lib/Automake/ChannelDefs.pm    | 126 ++++++++++++++++++++++++---------
 lib/Automake/Channels.pm       |  53 ++++++--------
 lib/Automake/Condition.pm      |   7 +-
 lib/Automake/Configure_ac.pm   |   5 +-
 lib/Automake/DisjConditions.pm |   2 +-
 lib/Automake/FileUtils.pm      |  19 ++---
 lib/Automake/General.pm        |   9 +--
 lib/Automake/Getopt.pm         |   5 +-
 lib/Automake/Options.pm        |  27 ++++---
 lib/Automake/Rule.pm           |  22 +++---
 lib/Automake/RuleDef.pm        |   5 +-
 lib/Automake/VarDef.pm         |   7 +-
 lib/Automake/Variable.pm       |  29 ++++----
 lib/Automake/Wrap.pm           |   5 +-
 lib/Automake/XFile.pm          |   7 +-
 t/python-virtualenv.sh         |   3 +-
 18 files changed, 191 insertions(+), 161 deletions(-)

-- 
2.28.0


Reply via email to