+ changelog-check strftime-check $(syntax-check-rules) \
+ makefile_path_separator_check \
+ makefile-check
+.PHONY: $(local-checks-available)
+
+local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
+
+.PHONY: $(syntax-check-rules)
+syntax-check-rules = \
+ sc_cast_of_argument_to_free \
+ sc_cast_of_x_alloc_return_value \
+ sc_cast_of_alloca_return_value \
+ sc_changelog \
+ sc_dd_max_sym_length \
+ sc_error_exit_success \
+ sc_file_system \
+ sc_no_if_have_config_h \
+ sc_obsolete_symbols \
+ sc_prohibit_atoi_atof \
+ sc_prohibit_jm_in_m4 \
+ sc_prohibit_assert_without_use \
+ sc_require_config_h \
+ sc_root_tests \
+ sc_space_tab \
+ sc_sun_os_names \
+ sc_system_h_headers \
+ sc_tight_scope \
+ sc_trailing_blank \
+ sc_two_space_separator_in_usage \
+ sc_unmarked_diagnostics \
+ sc_useless_cpp_parens
+
+syntax-check: $(syntax-check-rules)
+# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
+# $$(find -type f -name '*.[chly]') && \
+# { echo '$(ME): found conditional include' 1>&2; \
+# exit 1; } || :
+
+# grep -nE '^# *include <(string|stdlib)\.h>' \
+# $(srcdir)/{lib,src}/*.[chy] && \
+# { echo '$(ME): FIXME' 1>&2; \
+# exit 1; } || :
+# FIXME: don't allow `#include .strings\.h' anywhere
+
+sc_cast_of_argument_to_free:
+ @grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
+ { echo '$(ME): don'\''t cast free argument' 1>&2; \
+ exit 1; } || :
+
+sc_cast_of_x_alloc_return_value:
+ @grep -nE --exclude=$(srcdir)/lib/regex.c \
+ '\*\) *x(m|c|re)alloc\>' \
+ $(srcdir)/{lib,src}/*.[chy] && \
+ { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
+ exit 1; } || :
+
+sc_cast_of_alloca_return_value:
+ @grep -nE '\*\) *alloca\>' \
+ $(srcdir)/src/*.[chy] && \
+ { echo '$(ME): don'\''t cast alloca return value' 1>&2; \
+ exit 1; } || :
+
+sc_space_tab:
+ @grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \
+ { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
+ 1>&2; exit 1; } || :
+
+# Don't use the old ato* functions in `real' code.
+# They provide no error checking mechanism.
+# Instead, use strto* functions.
+sc_prohibit_atoi_atof:
+ @grep -nE '\<ato([filq]|ll)\>' $$($(CVS_LIST_EXCEPT)) && \
+ { echo '$(ME): do not use ato''f, ato''i, ato''l, ato''ll, or ato''q' \
+ 1>&2; exit 1; } || :
+
+# Using EXIT_SUCCESS as the first argument to error is misleading,
+# since when that parameter is 0, error does not exit. Use `0' instead.
+sc_error_exit_success:
+ @grep -nF 'error (EXIT_SUCCESS,' \
+ $$(find -type f -name '*.[chly]') && \
+ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
+ exit 1; } || :
+
+sc_file_system:
+ @grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \
+ { echo '$(ME): found use of "file''system";' \
+ 'rewrite to use "file system"' 1>&2; \
+ exit 1; } || :
+
+sc_no_if_have_config_h:
+ @grep -n '^# *if HAVE_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
+ { echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \
+ 1>&2; exit 1; } || :
+
+# Nearly all .c files must include <config.h>.
+sc_require_config_h:
+ @grep -L '^# *include <config\.h>' \
+ $$($(CVS_LIST_EXCEPT) | grep '\.c$$') \
+ | grep . && \
+ { echo '$(ME): the above files do not include <config.h>' \
+ 1>&2; exit 1; } || :
+
+# Prohibit the inclusion of assert.h without an actual use of assert.
+sc_prohibit_assert_without_use:
+ @files=$$(grep -l '# *include <assert\.h>' \
+ $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
+ grep -L '\<assert (' $$files \
+ | grep . && \
+ { echo "$(ME): the above files include <assert.h> but don't use it" \
+ 1>&2; exit 1; } || :
+
+sc_obsolete_symbols:
+ @grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
+ $$($(CVS_LIST_EXCEPT)) && \
+ { echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
+ 1>&2; exit 1; } || :
+
+# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
+
+# Each nonempty line must start with a year number, or a TAB.
+sc_changelog:
+ @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
+ { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
+ exit 1; } || :
+
+# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
+# with the strings from the two affected variables.
+dd_c = $(srcdir)/src/dd.c
+sc_dd_max_sym_length:
+ifneq ($(wildcard $(dd_c)),)
+ @len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
+ sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
+ |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
+ | wc --max-line-length); \
+ max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
+ |tr -d '"' | wc --max-line-length); \
+ if test "$$len" = "$$max"; then :; else \
+ echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
+ exit 1; \