diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-02-04 23:04:18 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-02-13 17:46:26 +0100 |
commit | 283ded7f5b9b7ad97300293cd65f3f1b48c21115 (patch) | |
tree | a6602008cf901a41d6e153219724a48784e2c9ac /bootstrap.sh | |
parent | 6d9e9dd453944cd86ddc530a131bd338f4734638 (diff) | |
download | automake-283ded7f5b9b7ad97300293cd65f3f1b48c21115.tar.gz |
build: auto-generate perl subroutines prototypes for automake and aclocal
This will allow us to avoid either using the '&foo' invocation form when
invoking a subroutine before its definition, or having to maintain the
list of prototypes by hand (with the risk of having it become incomplete
or fall out-of-sync when future edits to the automake and aclocal scripts
are done).
* Makefile.am (automake, aclocal): Automatically generate a list of
prototypes by looking at the subroutines definitions.
* bootstrap.sh: Likewise, when generating the temporary automake and
aclocal scripts used for bootstrapping.
* automake.in: Add a placeholder that will be tracked by the new recipes
and substituted with the computed prototypes. Remove existing prototypes,
that are now superfluous. Some adjustments required by the new, more
comprehensive prototypes declarations.
* aclocal.in: Likewise.
* maintainer/syntax-checks.mk (sc_diff_automake, sc_diff_aclocal): Adjust.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 93bf3fd54..541280ee0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -95,14 +95,15 @@ dosubst () dosubst automake-$APIVERSION/Automake/Config.in \ automake-$APIVERSION/Automake/Config.pm -# Create temporary replacement for aclocal. -dosubst aclocal.in aclocal.tmp - # Overwrite amversion.m4. dosubst m4/amversion.in m4/amversion.m4 -# Create temporary replacement for automake. -dosubst automake.in automake.tmp +# Create temporary replacement for aclocal and automake. +for p in aclocal automake; do + dosubst $p.in $p.tmp + $PERL -w lib/gen-perl-protos $p.tmp > $p.tmp2 + mv -f $p.tmp2 $p.tmp +done # Create required makefile snippets. $PERL ./gen-testsuite-part > t/testsuite-part.tmp |