From b6dba4cf2b4a00c068c934f2f858a97108efefb0 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 27 Oct 2012 18:08:06 +0200 Subject: [PATCH] maintcheck: guard against uses of ./defs in tests Now, 'test-init.sh' should be used instead. * (sc_tests_no_source_defs): New maintainer check. (syntax_check_rules): Add it. Signed-off-by: Stefano Lattarini --- syntax-checks.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/syntax-checks.mk b/syntax-checks.mk index 032e7be77..7640b3027 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -60,6 +60,7 @@ sc_perl_local \ sc_AMDEP_TRUE_in_automake_in \ sc_tests_make_without_am_makeflags \ $(sc_obsolete_requirements_rules) \ +sc_tests_no_source_defs \ sc_tests_obsolete_variables \ sc_tests_here_document_format \ sc_tests_command_subst \ @@ -334,6 +335,14 @@ sc_tests_Exit_not_exit: exit 1; \ fi +## Guard against obsolescent uses of ./defs in tests. Now, +## 'test-init.sh' should be used instead. +sc_tests_no_source_defs: + @if grep -E '\. .*defs($$| )' $(xtests); then \ + echo "Source 'test-init.sh', not './defs'." 1>&2; \ + exit 1; \ + fi + ## Use AUTOMAKE_fails when appropriate sc_tests_automake_fails: @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \ -- 2.47.2