Finally returning to the thread about whether to include the bootstrap script in the tarball: https://lists.gnu.org/archive/html/automake/2025-05/msg00013.html https://lists.gnu.org/archive/html/automake/2025-06/msg00000.html
The original report was about running bootstrap from tree made from a release tarball. So I have changed the automake bootstrap script to check for a .git directory. If not present, it quits (with a long msg). I'm persuaded that including the bootstrap script in the tarball is desirable, simply because it is a nontrivial source file. Even though it is actually harmful to run in the context of a tarball tree, being able to see the script can help explain how some infrastructure files are generated, e.g., m4/amversion.m4 and others. So I just committed the below. --happy hacking, karl. ----------------------------------------------------------------------------- maint: make ./bootstrap abort if no .git/ directory is present. In response to (long thread continuing over a month boundary): https://lists.gnu.org/archive/html/automake/2025-05/msg00013.html https://lists.gnu.org/archive/html/automake/2025-06/msg00000.html * bootstrap: if no .git directory is present, abort with a long-winded error message. Nothing good comes of running ./bootstrap in a tree from a release tarball, e.g., makeinfo suddenly becomes required, per the original report. diff --git a/bootstrap b/bootstrap index 5fc89023f..de337fecf 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh - # This script helps bootstrap automake, when checked out from git. +# It should not be run from a tree made from a (pre)release tarball. # # Copyright (C) 2002-2026 Free Software Foundation, Inc. # Originally written by Pavel Roskin <[email protected]> September 2002. @@ -22,6 +22,34 @@ # 'autoreconf -i' which would require Automake to already be # installed. +if test ! -d .git; then + cat <<END_NOT_GIT >&2 +$0: no .git directory, so exiting. +Long-winded explanation: + +The Automake bootstrap script is intended to be run only from the +top level of a git checkout of Automake, but no .git directory +is present (in `pwd`), so I'm exiting. + +In particular, it should not be run from a source tree expanded from a +release (or test release, etc.) tarball, because those trees already +contain everything needed for compilation, with minimal dependencies. +The development-specific actions of this bootstrap script will mess that +up, e.g., makeinfo will be required to build after running bootstrap. + +(By the way, this bootstrap script is still included in the release +tarballs even though it is not intended to be run in that context simply +because it is a nontrivial source file and thus potentially useful to +developers to see, regardless.) + +If you desire to run the bootstrap script in some tree that is not a git +checkout, just mkdir .git and the script will proceed. + +Goodbye from $0. +END_NOT_GIT + exit 1 +fi + # Don't ignore failures. set -e compile finished at Fri Jun 19 15:24:23 2026
