diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2010-10-03 11:45:31 +0200 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2010-10-03 11:45:31 +0200 |
commit | 145c2d0d024e2213a5c833427b4281fb55001709 (patch) | |
tree | 23b165c62d203bbb135a74e968d5dd27e39df400 /Makefile.in | |
parent | f6b05bd1bce89168db265d8464464562c54fa72e (diff) | |
download | automake-145c2d0d024e2213a5c833427b4281fb55001709.tar.gz |
maintainer-check coverage for variables before rules.
* Makefile.am (sc_ensure_testsuite_has_run): Suggest keeping
around the test directories.
(sc_tests_makefile_variable_order): New rule with a heuristic to
catch ordering violations.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index f4685414c..232fbf700 100644 --- a/Makefile.in +++ b/Makefile.in @@ -316,6 +316,7 @@ sc_tests_plain_sleep \ sc_tests_plain_egrep_fgrep \ sc_tests_PATH_SEPARATOR \ sc_tests_logs_duplicate_prefixes \ +sc_tests_makefile_variable_order \ sc_mkdir_p \ sc_perl_at_substs \ sc_unquoted_DESTDIR \ @@ -1188,7 +1189,7 @@ sc_tests_plain_egrep_fgrep: sc_ensure_testsuite_has_run: @if test ! -f tests/test-suite.log; then \ - echo "Run \`make check' before \`maintainer-check'" >&2; \ + echo "Run \`env keep_testdirs=yes make check' before \`maintainer-check'" >&2; \ exit 1; \ fi .PHONY: sc_ensure_testsuite_has_run @@ -1199,6 +1200,21 @@ sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run exit 1; \ fi +sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run + @for file in `find tests -name Makefile.in -print`; do \ + latevars=`sed -n \ + -e :x -e 's/#.*//' \ + -e '/\\\\$$/{' -e N -e 'b x' -e '}' \ + -e '1,/^ /d' \ + -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \ + if test -n "$$latevars"; then \ + echo 'Ensure variables are expanded before rules' >&2; \ + echo "Variables are expanded too late in $$file:" >&2; \ + echo "$$latevars" | sed 's/^/ /' >&2; \ + exit 1; \ + fi; \ + done + sc_tests_PATH_SEPARATOR: @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \ echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \ |