From: Stefano Lattarini Date: Fri, 10 Jun 2011 15:13:17 +0000 (+0200) Subject: maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline X-Git-Tag: v1.11.1b~26^2~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f84f54f530c8aa0fd3dcd7a31506eef169958a0a;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index 1a11eb226..6d8233ee3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-06-10 Stefano Lattarini + + 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 distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS diff --git a/Makefile.am b/Makefile.am index f0cc95e07..b25a30a1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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; \ diff --git a/Makefile.in b/Makefile.in index d6743e47a..6539f3c52 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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; \