maint: simplify generation of files with @substed@ stuff
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 6 Apr 2012 16:08:39 +0000 (18:08 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 8 Apr 2012 15:50:52 +0000 (17:50 +0200)
commitf854b6c0eb7905dc8c9f2899a8f43b94fd6957ff
treeec4049d43142b0deacb2c3b55352b77b7b6f090f
parentc38a2e62f99b2de0d06e438732a3eca4ab5effde
maint: simplify generation of files with @substed@ stuff

Use a proper "config.status --file=-" idiom to do most substitutions
in our generated files, to avoid too much duplications between the
various $(do_subst) commands in Makefile.am and the (explicit or
implicit AC_SUBST) invocation in configure.ac.

From a suggestion by Eric Blake and Federico Simoncelli:
<http://lists.gnu.org/archive/html/automake/2012-01/msg00011.html>

* Makefile.am (do_subst): Rewrite to take advantage of the
"config.status --file=-" idiom.
(generated_file_finalize): New, to help checking that generated
files don't contain unexpanded '@substitutions@', and are made
read-only.
(automake, aclocal): Take advantage of the improved $(do_subst).
Improve comments.
(lib/Automake/Config.pm): Likewise, and of the new variable
$(generated_file_finalize) as well.
($(top_srcdir)/m4/amversion.m4): Likewise.
(defs-static): Likewise, and depend explicitly on 'Makefile'.
(do_subst_t): Remove as obsolete.
* THANKS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am
THANKS