From: Stefano Lattarini Date: Thu, 2 Jun 2011 10:15:52 +0000 (+0200) Subject: maintcheck: fix some failures, extend some checks X-Git-Tag: ng-0.5a~171^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24b9022b753b129d9a2832904fbd9b7a7bbb17d6;p=thirdparty%2Fautomake.git maintcheck: fix some failures, extend some checks * Makefile.am (sc_diff_automake_in_automake): Update, as we now expect 9 lines, not 8, to be changed from `automake.in' to `automake'. (sc_diff_aclocal_in_aclocal): New maintainer check, similar to the above, and checking that only 10 lines are changed from `aclocal.in' to `aclocal'. (syntax_check_rules): Update. (sc_tests_Exit_not_exit): Exempt self tests `self-check-*.test' from this check, as they can legitimately use the bare `exit' builtin in various places. * doc/automake.texi (Python): Remove stray `@' from the end of a line. Typo introduced in commit `v1.11-312-g5bf7af6'. * tests/depcomp8a.test: Pass DISTCHECK_CONFIGURE_FLAGS to make from the environment rather than from the command line, to pacify the `sc_tests_overriding_macros_on_cmdline' maintainer check. * tests/depcomp8b.test: Likewise. --- diff --git a/ChangeLog b/ChangeLog index fd1312eea..cb9918fc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2011-06-02 Stefano Lattarini + + maintcheck: fix some failures, extend some checks + * Makefile.am (sc_diff_automake_in_automake): Update, as we + now expect 9 lines, not 8, to be changed from `automake.in' + to `automake'. + (sc_diff_aclocal_in_aclocal): New maintainer check, similar to + the above, and checking that only 10 lines are changed from + `aclocal.in' to `aclocal'. + (syntax_check_rules): Update. + (sc_tests_Exit_not_exit): Exempt self tests `self-check-*.test' + from this check, as they can legitimately use the bare `exit' + builtin in various places. + * doc/automake.texi (Python): Remove stray `@' from the end of + a line. Typo introduced in commit `v1.11-312-g5bf7af6'. + * tests/depcomp8a.test: Pass DISTCHECK_CONFIGURE_FLAGS to make + from the environment rather than from the command line, to + pacify the `sc_tests_overriding_macros_on_cmdline' maintainer + check. + * tests/depcomp8b.test: Likewise. + 2011-05-29 Stefano Lattarini remake: behave better with non-GNU make in subdirectories diff --git a/Makefile.am b/Makefile.am index 195927c0b..f0cc95e07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ ## Makefile for Automake. # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -115,6 +116,7 @@ dist-hook: syntax_check_rules = \ sc_test_names \ sc_diff_automake_in_automake \ +sc_diff_aclocal_in_automake \ sc_perl_syntax \ sc_no_brace_variable_expansions \ sc_rm_minus_f \ @@ -214,15 +216,22 @@ sc_test_names: exit 1; \ fi -## This check avoids accidental configure substitutions in the source. -## There are exactly 8 lines that should be modified. This works out -## to 28 lines of diffs. +## These check avoids accidental configure substitutions in the source. +## There are exactly 9 lines that should be modified from automake.in to +## automake, and 10 lines that should be modified from aclocal.in to +## aclocal; these wors out to 32 and 34 lines of diffs, respectively. sc_diff_automake_in_automake: - @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \ + @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \ echo "found too many diffs between automake.in and automake" 1>&2; \ diff -c $(srcdir)/automake.in automake; \ exit 1; \ fi +sc_diff_aclocal_in_aclocal: + @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \ + echo "found too many diffs between aclocal.in and aclocal" 1>&2; \ + diff -c $(srcdir)/aclocal.in aclocal; \ + exit 1; \ + fi ## Syntax check with default Perl (on my machine, Perl 5). sc_perl_syntax: @@ -386,9 +395,10 @@ sc_tests_here_document_format: ## Tests should never call exit directly, but use Exit. ## This is so that the exit status is transported correctly across the 0 trap. -## Ignore comments, and ignore one perl line in ext2.test. +## Ignore comments, testsuite self tests, and one perl line in ext2.test. sc_tests_Exit_not_exit: @found=false; for file in $(srcdir)/tests/*.test; do \ + case $$file in */self-check-*.test) continue;; esac; \ res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \ -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \ if test -n "$$res"; then \ diff --git a/Makefile.in b/Makefile.in index c530c010f..d0951e06b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,8 @@ @SET_MAKE@ # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -276,6 +277,7 @@ do_subst = sed \ syntax_check_rules = \ sc_test_names \ sc_diff_automake_in_automake \ +sc_diff_aclocal_in_automake \ sc_perl_syntax \ sc_no_brace_variable_expansions \ sc_rm_minus_f \ @@ -944,11 +946,17 @@ sc_test_names: fi sc_diff_automake_in_automake: - @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \ + @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \ echo "found too many diffs between automake.in and automake" 1>&2; \ diff -c $(srcdir)/automake.in automake; \ exit 1; \ fi +sc_diff_aclocal_in_aclocal: + @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \ + echo "found too many diffs between aclocal.in and aclocal" 1>&2; \ + diff -c $(srcdir)/aclocal.in aclocal; \ + exit 1; \ + fi sc_perl_syntax: perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake @@ -1087,6 +1095,7 @@ sc_tests_here_document_format: sc_tests_Exit_not_exit: @found=false; for file in $(srcdir)/tests/*.test; do \ + case $$file in */self-check-*.test) continue;; esac; \ res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \ -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \ if test -n "$$res"; then \ diff --git a/doc/automake.texi b/doc/automake.texi index 3c4bdddc1..3846e0d6d 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -7605,7 +7605,7 @@ files in your @file{Makefile.am}, depending on where you want your files installed (see the definitions of @code{pythondir} and @code{pkgpythondir} below). -@defmac AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found}, @ +@defmac AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found}, @ovar{action-if-not-found}) Search for a Python interpreter on the system. This macro takes three diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test index d8eff56f7..ea14c3fcf 100755 --- a/tests/depcomp8a.test +++ b/tests/depcomp8a.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -57,7 +57,7 @@ $AUTOCONF ./configure --enable-dependency-tracking $MAKE ./zardoz -$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck +DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck # Try again with subdir-objects option. @@ -76,6 +76,6 @@ $AUTOCONF ./configure --enable-dependency-tracking $MAKE ./zardoz -$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck +DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck : diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test index 6315d4d50..d36e75462 100755 --- a/tests/depcomp8b.test +++ b/tests/depcomp8b.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -52,7 +52,7 @@ $AUTOCONF # Don't reject slower dependency extractors, for better coverage. ./configure --enable-dependency-tracking $MAKE -$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck +DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck # Try again with subdir-objects option. @@ -70,6 +70,6 @@ $AUTOCONF # Don't reject slower dependency extractors, for better coverage. ./configure --enable-dependency-tracking $MAKE -$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck +DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck :