]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
maintcheck: fix maintainer-check failures, both real and spurious
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 3 Aug 2011 14:35:49 +0000 (16:35 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 3 Aug 2011 14:37:36 +0000 (16:37 +0200)
* tests/amhello-binpkg.test: Use "$MAKE", not bare "make".
* Makefile.am (sc_perl_local): Also allow perl special variable
`$~' to be localized.  And be slightly laxer in the regexp, to
allow for usages like "local $_ = $foo;".
(sc_tests_overriding_macros_on_cmdline): Also allow for command
line overriding of the `DISABLE_HARD_ERRORS' make variable.  Try
to avoid false positives for usages like "$MAKE || st=$?".

ChangeLog
Makefile.am
Makefile.in
tests/amhello-binpkg.test

index 8d5e33af6a3769674c74f084cb934c587b0fe47a..51a4e02a2bf70672db5f73044b5e6cf0790034b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix maintainer-check failures, both real and spurious
+       * tests/amhello-binpkg.test: Use "$MAKE", not bare "make".
+       * Makefile.am (sc_perl_local): Also allow perl special variable
+       `$~' to be localized.  And be slightly laxer in the regexp, to
+       allow for usages like "local $_ = $foo;".
+       (sc_tests_overriding_macros_on_cmdline): Also allow for command
+       line overriding of the `DISABLE_HARD_ERRORS' make variable.  Try
+       to avoid false positives for usages like "$MAKE || st=$?".
+
 2011-08-03  Bruno Haible  <bruno@clisp.org>
 
        docs: how to use '-I' option in AM_CPPFLAGS for best VPATH support
index 835f00a55c1643bc764110c36580c015c7391276..51eeb238c4f5c2857593ae09e54860c71e08bbbe 100644 (file)
@@ -337,9 +337,9 @@ sc_perl_local_no_parens:
          exit 1; \
        fi
 
-## Allow only `local $_' in Automake.
+## Allow only few variables to be localized in Automake.
 sc_perl_local:
-       @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
+       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
                grep '^[ \t]*local [^*]'; then \
          echo "Please avoid \`local'." 1>&2; \
          exit 1; \
@@ -467,17 +467,19 @@ sc_tests_required_after_defs:
 
 ## Overriding a Makefile macro on the command line is not portable when
 ## recursive targets are used.  Better use an envvar.  SHELL is an
-## exception, POSIX says it can't come from the environment.  DESTDIR and
-## DISTCHECK_CONFIGURE_FLAGS and V are exceptions, too, as package authors
-## are urged not to initialize them anywhere.
+## exception, POSIX says it can't come from the environment.  V, DESTDIR,
+## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
+## as package authors are urged not to initialize them anywhere.
 sc_tests_overriding_macros_on_cmdline:
        @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test; then \
          echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
          echo ' in the above lines, it is more portable.' 1>&2; \
          exit 1; \
        fi
-       @if sed -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
-               -e 's/ V=[^ ]*/ /' -e 's///' \
+## Also try to account for usages like "$MAKE || st=$?".
+       @if sed -e 's/ || .*//' -e 's/ && .*//' \
+               -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+               -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
 ## DISTCHECK_CONFIGURE_FLAGS is allowed to contain whitespace in its
 ## definition, so the more complex substitutions below.
                -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
index 1c241e51caad1b7e4536be418651b9727b03b834..35a9cbdac8c9dc6cd71f45955ce07a770bba575b 100644 (file)
@@ -1048,7 +1048,7 @@ sc_perl_local_no_parens:
        fi
 
 sc_perl_local:
-       @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
+       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
                grep '^[ \t]*local [^*]'; then \
          echo "Please avoid \`local'." 1>&2; \
          exit 1; \
@@ -1162,8 +1162,9 @@ sc_tests_overriding_macros_on_cmdline:
          echo ' in the above lines, it is more portable.' 1>&2; \
          exit 1; \
        fi
-       @if sed -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
-               -e 's/ V=[^ ]*/ /' -e 's///' \
+       @if sed -e 's/ || .*//' -e 's/ && .*//' \
+               -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+               -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
                -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
                -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
                -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
index 34dc5194e3ded81710996e61374d3e256bfe230f..f11421ff6886065a0b2978e049428f1392fa22d5 100755 (executable)
@@ -28,8 +28,8 @@ gzip -dc amhello-1.0.tar.gz | tar xf -
 cd amhello-1.0
 
 ./configure --prefix /usr
-make
-make DESTDIR="`pwd`/inst" install
+$MAKE
+$MAKE DESTDIR="`pwd`/inst" install
 cd inst
 find . -type f -print > ../files.lst
 tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > tar.got 2>&1