]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Jun 2011 15:13:17 +0000 (17:13 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Jun 2011 15:13:17 +0000 (17:13 +0200)
* Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
on the make command line.  Update comments accordingly.  Since we
are at it, make the relevant grepping rules slightly tighter.

ChangeLog
Makefile.am
Makefile.in

index 1a11eb22663b32bed4baa98437b0fffaf5c06204..6d8233ee366db02fd58e2d7804d7c3d2c3472871 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
+       * Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
+       acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
+       on the make command line.  Update comments accordingly.  Since we
+       are at it, make the relevant grepping rules slightly tighter.
+
 2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
index f0cc95e07eeb209aa010912622bbdcc4e8ca2c0b..b25a30a1ba63436c0952fb1bba4cc35401290e82 100644 (file)
@@ -442,17 +442,24 @@ sc_tests_required_after_defs:
        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.  V and DESTDIRS are exceptions,
-## too, as package authors are urged not to initialize them anywhere.
+## 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.
 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 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' $(srcdir)/tests/*.test | \
-           grep '\$$MAKE .*=' ; then \
+       @if sed -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+               -e 's/ V=[^ ]*/ /' -e 's///' \
+## DISTCHECK_CONFIGURE_FLAGS is allowed to contain whitespace in its
+## definition, so the more complex substitutions below.
+               -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+             $(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 d6743e47abbb311785c56282e35a9a2e1b4aa9cc..6539f3c522484821007465da8655ca7702927705 100644 (file)
@@ -1141,8 +1141,12 @@ sc_tests_overriding_macros_on_cmdline:
          echo ' in the above lines, it is more portable.' 1>&2; \
          exit 1; \
        fi
-       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' $(srcdir)/tests/*.test | \
-           grep '\$$MAKE .*=' ; then \
+       @if sed -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
+               -e 's/ V=[^ ]*/ /' -e 's///' \
+               -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+             $(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; \