]> git.ipfire.org Git - thirdparty/automake.git/commit
[ng] warns: typos in _SOURCES etc. reported at make runtime
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 5 Jun 2012 11:49:04 +0000 (13:49 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 5 Jun 2012 20:35:30 +0000 (22:35 +0200)
commit67d61020ff23f630bfa47bf6eec5036ecad5de74
tree4405db26d2c494a6ba9267e94ccb8c247e50d9d3
parent181bc4246fcada82bc1221406428169bf8df6a2e
[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>
Makefile.am
automake.in
lib/am/check-typos.am [new file with mode: 0644]
lib/am/header-vars.am
t/spell.sh
t/spell2.sh
t/vartypo2.sh [deleted file]
t/vartypos.sh
t/warnopts.sh