# guaranteed to work on my machine.
syntax_check_rules = \
$(sc_tests_plain_check_rules) \
-sc_test_names \
sc_diff_automake_in_automake \
sc_diff_aclocal_in_automake \
sc_perl_syntax \
sc_perl_local \
sc_AMDEP_TRUE_in_automake_in \
sc_tests_make_without_am_makeflags \
+$(sc_obsolete_requirements_rules) \
sc_tests_obsolete_variables \
sc_tests_here_document_format \
sc_tests_command_subst \
sc_tabs_in_texi \
sc_at_in_texi
-## Look for test whose names can cause spurious failures when used as
-## first argument to AC_INIT (chiefly because they might contain an
-## m4/m4sugar builtin or macro name).
-m4_builtins = \
- __gnu__ \
- __unix__ \
- bpatsubst \
- bregexp \
- builtin \
- changecom \
- changequote \
- changeword \
- debugfile \
- debugmode \
- decr \
- define \
- defn \
- divert \
- divnum \
- dnl \
- dumpdef \
- errprint \
- esyscmd \
- eval \
- format \
- ifdef \
- ifelse \
- include \
- incr \
- index \
- indir \
- len \
- m4exit \
- m4wrap \
- maketemp \
- mkstemp \
- patsubst \
- popdef \
- pushdef \
- regexp \
- shift \
- sinclude \
- substr \
- symbols \
- syscmd \
- sysval \
- traceoff \
- traceon \
- translit \
- undefine \
- undivert
-sc_test_names:
- @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
- m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
- if { \
- for t in $(xtests); do echo $$t; done \
- | LC_ALL=C grep -E "$$m4_macro_rx"; \
- }; then \
- echo "the names of the tests above can be problematic" 1>&2; \
- echo "Avoid test names that contain names of m4 macros" 1>&2; \
- exit 1; \
- fi
-
## These check avoids accidental configure substitutions in the source.
## There are exactly 9 lines that should be modified from automake.in to
## automake, and 10 lines that should be modified from aclocal.in to
exit 1; \
else :; fi
+## Look out for obsolete requirements specified in the test cases.
+sc_obsolete_requirements_rules = sc_no_texi2dvi-o sc_no_makeinfo-html
+modern-requirement.texi2dvi-o = texi2dvi
+modern-requirement.makeinfo-html = makeinfo
+
+$(sc_obsolete_requirements_rules): sc_no_% :
+ @if grep -E 'required=.*\b$*\b' $(xtests); then \
+ echo "Requirement '$*' is obsolete and shouldn't" \
+ "be used anymore." >&2; \
+ echo "You should use '$(modern-requirement.$*)' instead." >&2; \
+ exit 1; \
+ fi
+
## Tests should never call some programs directly, but only through the
## corresponding variable (e.g., '$MAKE', not 'make'). This will allow
## the programs to be overridden at configure time (for less brittleness)