[ng] warns: typos in _SOURCES etc. reported at make runtime
For example, on an input:
bin_PROGRAMS = frob
forb_SOURCES = main.c
a proper warning should be given, since either 'forb' or 'frob' is likely a
typo. Mainline Automake gives the warning at automake runtime, while with
this change, the warnings will be moved at make runtime. This will allow
us to warn about variables like '_DEPENDENCIES', whose definitions can
be unavailable (or unanalyzable) at automake runtime (check about those
variables had to be disabled in commit '
v1.12-295-g9a5f837' of 2012-05-22,
"[ng] warns: don't report possible issues with '_DEPENDENCIES' variables",
to avoid spurious errors).
* automake.in (generate_makefile): Emit code to perform make runtime
checks, in particular those moved out from ...
(check_typos): ... this now-deleted function ...
* lib/am/check-typos.am: ... into this new Makefile fragment.
* Makefile.am (dist_am_DATA): Add the new file.
* lib/am/header-vars.am (am__error): New internal function, declares an
error without immediately terminating the make process. Allows us to
diagnose more issues at once, rather than stopping at the first one.
* t/spell.sh: Adjust and extend.
* t/spell2.sh: Likewise.
* t/warnopts.sh: Adjust.
* t/vartypo2.sh: Remove, its content adjusted and merged ...
* t/vartypos.sh: ... into this test, adjusted and extended as well.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>