automake: Usage, Options & Common CI Errors
automake turns a high-level Makefile.am into a portable Makefile.in.
automake generates the Makefile.in that configure expands into a Makefile. The CI pitfalls are missing auxiliary files (NEWS, README) in default GNU strictness and forgetting --add-missing.
What it does
automake reads Makefile.am files and produces Makefile.in templates that follow GNU conventions (install targets, distcheck, dependency tracking). It is part of autoreconf’s chain and depends on aclocal-collected macros.
Common usage
automake --add-missing --copy
autoreconf -fi # runs automake for you
automake --foreign --add-missing # relax GNU file requirements
aclocal && automake && autoconf
./configure && makeOptions
| Flag | What it does |
|---|---|
| --add-missing | Add required helper scripts (install-sh, etc.) |
| --copy | Copy helpers instead of symlinking |
| --foreign | Relax GNU strictness (no NEWS/README) |
| --force-missing | Overwrite existing helper files |
| -Wall -Werror | Treat automake warnings as errors |
Common errors in CI
"required file ‘./NEWS’ not found" (also README, AUTHORS, ChangeLog) appears under default GNU strictness - either add the files or set AM_INIT_AUTOMAKE([foreign]) / run with --foreign. "Makefile.am: required file ‘./install-sh’ not found" - run automake --add-missing (autoreconf -fi does this). Version skew between the committed Makefile.in and the installed automake causes "aclocal-1.NN: not found"; regenerate from source with autoreconf -fi in CI.