From 574b20e518079db0f91720c0641e4222d9fda84f Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 8 Jul 2017 20:18:45 +0200 Subject: build: Inline perl prototypes in sources Prototypes allows us to avoid using the '&foo' invocation form when invoking a subroutine before its definition. Previously those prototypes were generated to prevent them from falling out-of-sync with actual definitions. Now we provide a 'check-perl-protos' lint script to ensure that this is not the case. This has the same benefits as generating prototypes while simplifying the bootstrap/build process. * bin/gen-perl-protos: Remove. * bin/Makefile.inc: Adapt. * bootstrap: Likewise. * bin/aclocal.in: Inline prototypes. * bin/automake.in: Likewise. * maintainer/check-perl-protos: New lint script. * maintainer/syntax-checks.mk (sc_perl_protos): New target. (syntax_check_rules): Add it. --- bootstrap | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index d0766d4c8..1382a9fe8 100755 --- a/bootstrap +++ b/bootstrap @@ -103,11 +103,8 @@ dosubst automake-$APIVERSION/Automake/Config.in \ dosubst m4/amversion.in m4/amversion.m4 # Create temporary replacement for aclocal and automake. -for p in bin/aclocal bin/automake; do - dosubst $p.in $p.tmp - $PERL -w bin/gen-perl-protos $p.tmp > $p.tmp2 - mv -f $p.tmp2 $p.tmp -done +dosubst bin/aclocal.in bin/aclocal.tmp +dosubst bin/automake.in bin/automake.tmp # Create required makefile snippets. $PERL ./gen-testsuite-part > t/testsuite-part.tmp -- cgit v1.2.1