Fix maintainer-check failure.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 28 Mar 2009 23:53:40 +0000 (00:53 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 28 Mar 2009 23:53:40 +0000 (00:53 +0100)
* Makefile.am (maintainer-check): Do not complain if DESTDIR is
passed as argument to `make'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
Makefile.am
Makefile.in

index 2d552e3..d7337d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-03-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * Makefile.am (maintainer-check): Do not complain if DESTDIR is
+       passed as argument to `make'.
+
        * doc/automake.texi (Cross-Compilation): Fix underfull hbox.
 
        Sync auxiliary files from upstream.
index d637e10..1b36de1 100644 (file)
@@ -273,13 +273,15 @@ maintainer-check: automake aclocal
        done
 ## 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.
+## POSIX says it can't come from the environment.  DESTDIRS is an exception,
+## too, as package authors are urged not to intitialize this anywhere.
        @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 grep -v SHELL $(srcdir)/tests/*.test | grep '\$$MAKE .*=' ; then \
+       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//' $(srcdir)/tests/*.test | \
+         grep '\$$MAKE .*=' ; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \
index 7135f53..ad302a5 100644 (file)
@@ -940,7 +940,8 @@ maintainer-check: automake aclocal
          echo ' in the above lines, it is more portable.' 1>&2; \
          exit 1; \
        fi
-       @if grep -v SHELL $(srcdir)/tests/*.test | grep '\$$MAKE .*=' ; then \
+       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//' $(srcdir)/tests/*.test | \
+         grep '\$$MAKE .*=' ; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \