+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
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; \
## 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='[^']*'/ /" \
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; \
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=[^ ]/ /' \