Files
httrack/bootstrap
Xavier Roche d90f3e356d build: stop tracking generated autotools files; add bootstrap/build.sh
The generated build system (configure, every Makefile.in, config.h.in,
ltmain.sh, config.guess/sub, the aux scripts) was committed so a bare git
clone could build without autotools. Nothing downstream relied on the
committed copies: CI runs autoreconf -fi, Debian regenerates via
dh_autoreconf, and the release tarball is built by make dist, which
regenerates them regardless. The only cost was a recurring footgun: a stale
Makefile.in after a *_SOURCES edit silently broke the plain build (undefined
reference to cache_selftests), and CI could not catch it.

Treat them as build products. They are now .gitignored and regenerated from
configure.ac/Makefile.am by the new ./bootstrap (autoreconf -fi), and shipped
only inside make dist tarballs so tarball users still need no autotools.
build.sh is a one-shot wrapper (bootstrap + configure + make) that runs
configure via /bin/sh, so it survives a noexec source tree. Both scripts join
EXTRA_DIST. INSTALL.Linux, README.md and AGENTS.md document the git flow:
./bootstrap before ./configure, autotools required for a git build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
2026-06-16 22:48:04 +02:00

25 lines
861 B
Bash
Executable File

#!/bin/sh
#
# Regenerate the autotools build system (configure, Makefile.in, config.h.in,
# libtool, the aux scripts) from configure.ac and the Makefile.am files.
#
# Run this once after a fresh git clone, before ./configure. Release tarballs
# (made with "make dist") already ship these files, so people building from a
# tarball do not need autotools and do not run this.
#
# Requires: autoconf, automake, libtool (the autoreconf toolchain).
set -e
# shellcheck disable=SC1007 # "CDPATH= cd" is a deliberate empty-CDPATH prefix.
srcdir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
cd "$srcdir"
if ! command -v autoreconf >/dev/null 2>&1; then
echo "bootstrap: autoreconf not found; install autoconf, automake and libtool" >&2
echo " (or build from a release tarball, which ships ./configure)" >&2
exit 1
fi
exec autoreconf -fi "$@"