autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH 0/3] RFC: automated bootstrap script


From: Zack Weinberg
Subject: [PATCH 0/3] RFC: automated bootstrap script
Date: Fri, 5 Feb 2021 10:34:32 -0500

The procedure for building Autoconf from a git checkout is a little
awkward, involving building it once, then using the just-built
autoconf to regenerate the configure script in the source directory,
then throwing away the entire first build and doing it over again, and
only then is the test suite reliable.

This patch set automates and optimizes the process with a new
top-level, git-only script called ‘bootstrap’.  The idea is copied
from Automake: you run this script instead of ‘autoreconf -i’.  It
does what ‘autoreconf -i’ would do, but it uses the unbuilt autoconf
from the git checkout itself to generate the configure script, so it’s
right the first time.  In addition to being automated and therefore
less error-prone, it’s also substantially faster, because it doesn’t
waste time building all the documentation or tools that aren’t needed
for the bootstrap process.

I have verified that the tarball created by

git clean -xdf
./bootstrap
./configure
make dist

is identical to the tarball created by

git clean -xdf
autoreconf -i
./configure
make
(PATH=$PWD/tests:$PATH; autoreconf -i)
make distclean
./configure
make dist

starting from the same point in the version history.

I would like to land this patchset on both trunk and the 2.70 branch,
because it will help with setting up CI quite a bit.  However, it does
involve some relatively invasive changes to the actual code, notably
rewriting the ‘autoconf’ driver program in Perl so the bootstrap
script doesn’t have to know how to generate M4sh scripts, so I’m
posting this for comments and will wait one week before proceeding.
(I think the code changes are desirable for other reasons, but the
bootstrap process is why I did them now.)

Zack Weinberg (3):
  Generate version.m4 from config.status, in lib/ not lib/m4sugar/.
  Rewrite bin/autoconf in Perl.
  Add a bootstrap script like Automake has.

 .gitignore                |   1 -
 README-hacking            |  22 ++--
 bin/autoconf.as           | 208 ---------------------------------
 bin/autoconf.in           | 213 ++++++++++++++++++++++++++++++++++
 bin/local.mk              |  23 ++--
 bootstrap                 | 235 ++++++++++++++++++++++++++++++++++++++
 build-aux/help-extract.pl |  49 +-------
 configure.ac              |   1 +
 lib/freeze.mk             |   2 +-
 lib/local.mk              |  25 +---
 lib/m4sugar/m4sugar.m4    |   6 +-
 lib/version.in            |  12 ++
 man/autoconf.w            |   2 +-
 man/local.mk              |   2 +-
 tests/tools.at            |   2 +-
 15 files changed, 493 insertions(+), 310 deletions(-)
 delete mode 100644 bin/autoconf.as
 create mode 100644 bin/autoconf.in
 create mode 100755 bootstrap
 create mode 100644 lib/version.in

-- 
2.30.0




reply via email to

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