[Top][All Lists]

[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
make dist

is identical to the tarball created by

git clean -xdf
autoreconf -i
(PATH=$PWD/tests:$PATH; autoreconf -i)
make distclean
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/           | 208 ---------------------------------
 bin/           | 213 ++++++++++++++++++++++++++++++++++
 bin/              |  23 ++--
 bootstrap                 | 235 ++++++++++++++++++++++++++++++++++++++
 build-aux/ |  49 +-------              |   1 +
 lib/             |   2 +-
 lib/              |  25 +---
 lib/m4sugar/m4sugar.m4    |   6 +-
 lib/            |  12 ++
 man/autoconf.w            |   2 +-
 man/              |   2 +-
 tests/            |   2 +-
 15 files changed, 493 insertions(+), 310 deletions(-)
 delete mode 100644 bin/
 create mode 100644 bin/
 create mode 100755 bootstrap
 create mode 100644 lib/


reply via email to

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