Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

43.5. automake-1.19

Programs for generating Makefiles for use with Autoconf

Version 1.19, release 1
Shelf buildtools — Build systems and build helpers
Phase 30_foundation (Build Foundation), 16 of 127 in build order
Licence GPL-2.0-or-later
Homepage https://www.gnu.org/software/automake/
Build time 0.1 SBU
Installed size 2.1 MiB in 126 files
Recipe ports/core/buildtools/automake/kpkgbuild

About

GNU Automake turns a project’s Makefile.am files into the Makefile.in templates its configure fills in, and aclocal collects the macros configure.ac uses into aclocal.m4. Like autoconf, it matters to a recipe that regenerates its build system with autoreconf, which runs aclocal and automake from this port, and it is in the opening run of 30_foundation, ahead of every shelf, because such a recipe calls it without naming automake in depends.

Why it is in KDOS

The comment above the 24 ports from fortify-headers to musl-utils in script/phases/30_foundation/packages.txt is quoted in The build foundation.

Sources

Dependencies

Depends on: autoconf.

Required by (102): abiword, admesh, afflib, aircrack-ng, anthy-unicode, argp-standalone, asio, audiofile, avahi, bitwise, brltty, calcurse, catatonit, chemical-mime-data, chocolate-doom, crispy-doom, cyrus-sasl-xoauth2, dasher, dfu-util, dosbox-x, dotconf, erfa, erofs-utils, espeak-ng, expat, f2fs-tools, freedv-gui, ghc, gmime, hamlib, handbrake, id3lib, iverilog, kodi, koreader, libao, libcap-ng, libdmtx, libetpan, libiscsi, libixion, libmodbus, libndp, libnova, libraw, libsass, libsigrok, libsigrokdecode, libstrophe, libtpms, libuv, libxdg-basedir, linuxcnc, lnav, lrdf, ltrace, minicom, minidlna, minizip, motif, musl-fts, musl-obstack, nco, nec2c, networkmanager-openvpn, nfs-utils, ocl-icd, openocd, opensp, orcaslicer, par2cmdline-turbo, partclone, pcaudiolib, qrencode, sane-backends, sassc, schismtracker, sdl2-gfx, sgml-common, shairplay, sigrok-cli, sleuthkit, slirp4netns, stk, swtpm, system-config-printer, testdisk, thermald, tlf, ubdsrv, universal-ctags, usbmuxd, verilator, voacapl, w3m, xastir, xnec2c, yara, yasm, yices2, zbar, zimg.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/30_foundation/phase.env && kpkg install automake'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/buildtools/automake.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/buildtools/automake
echo 'e3e2c2e3abf37898138db5b6c1d1dc35c9160c5978be7947d2c741705251d445  automake-1.19.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/automake
SRC=$SRC_ROOT/automake-1.19
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf automake-1.19.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

./configure --prefix=/usr
make
make DESTDIR=$PKG install

rm $PKG/usr/share/automake-*/texinfo.tex

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/automake, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf automake-1.19-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/automake, and runs the triggers its paths call for.

Contents

Installed programs: aclocal, aclocal-1.19, automake, automake-1.19.

Installed directories: /usr/share/aclocal-1.19, /usr/share/automake-1.19, /usr/share/doc/automake, /usr/share/licenses/automake.

Short descriptions

aclocal-1.19 Generate aclocal.m4 by scanning configure.ac
automake-1.19 Generate Makefile.in files for configure from Makefile.am

Notes

build.sh deletes automake’s own copy of texinfo.tex, /usr/share/automake-<version>/texinfo.tex, after the install, and no other package installs one there. automake --add-missing, which autoreconf -i runs, copies that file into a project whose Makefile.am lists info_TEXINFOS and whose source carries no texinfo.tex of its own, in the top directory or in the directory AC_CONFIG_AUX_DIR names. Without the copy, automake stops such a project with an error that the required file texinfo.tex is not found, unless the project sets automake’s no-texinfo.tex option or names its own copy in TEXINFO_TEX.