[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 0/2] Additional AC_INIT/AC_OUTPUT-related diagnostics

From: Zack Weinberg
Subject: [RFC PATCH 0/2] Additional AC_INIT/AC_OUTPUT-related diagnostics
Date: Fri, 14 Aug 2020 14:44:20 -0400

In Savannah bug #107986, David Wheeler contributed some additional
diagnostics for misuse of AC_INIT.  I sat down to review them late
last week and wound up making so many changes and enhancements that
this is effectively a rewrite from scratch.  (I would like to
apologize to David for making him go through the copyright assignment
process and then not actually using any of his code.)

The first patch, which I hope is uncontroversial, makes AC_INIT trim
whitespace (via m4_normalize) from all its arguments, and extends the
existing checks for inappropriate contents of the first three
arguments to cover the fourth and fifth as well.

The second patch adds warnings when a is missing calls to
AC_INIT and/or AC_OUTPUT.  The concept here should also be
unproblematic, but I’m not entirely happy with the implementation.
David’s original implementation used an extra trace pass and custom
logic in bin/  I decided it would be better to make these
normal syntax warnings, but this involves an m4_wrap hook that’s *not*
run when tracing or when freezing, and the clean way to do that would
involve adding a feature to autom4te.  I found a kludge that works,
but I’d like to hear opinions on whether we should instead postpone
this patch till after 2.70 so we can coordinate with automake on the
addition of the missing autom4te feature.


Zack Weinberg (2):
  Trim whitespace from arguments of AC_INIT (#107986)
  Warn if AC_INIT or AC_OUTPUT are missing from (#107986)

 NEWS                    |  14 ++++++
 bin/         |  14 +++++-
 bin/       |  14 ++++--
 doc/autoconf.texi       |   7 ++-
 lib/autoconf/general.m4 |  93 ++++++++++++++++++++++++++---------
 lib/autoconf/status.m4  |   6 +++
 lib/autoconf/trailer.m4 |   4 ++
 lib/            |   3 +-
 tests/           | 106 ++++++++++++++++++++++++++++++++++------
 tests/              |   1 +
 tests/        |  26 ++++++++--
 tests/           |   5 +-
 tests/      |  12 ++---
 tests/          |  28 +++++++++--
 tests/        |  13 +++--
 tests/        |   3 +-
 16 files changed, 284 insertions(+), 65 deletions(-)
 create mode 100644 lib/autoconf/trailer.m4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]