+
+# Used by maintainers to check the source code with cppcheck.
+check-cppcheck:
+ cd $(abs_top_srcdir) && \
+ find . -name .git -prune -o -name '*.[ch]' -print \
+ | cppcheck -q --force --error-exitcode=2 --file-list=- \
+ --suppressions-list=tests/data/cppcheck.supp \
+ --enable=warning,performance,portability,style
+
+# The full path to valgrind and its options, used when doing valgrind
+# testing.
+VALGRIND_COMMAND = $(PATH_VALGRIND) --leak-check=full \
+ --trace-children=yes --trace-children-skip=/bin/sh \
+ --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp \
+ --log-file=$(abs_top_builddir)/tests/tmp/valgrind/log.%p
+
+# Used by maintainers to run the main test suite under valgrind.
+check-valgrind: $(check_PROGRAMS) tests/data/dictionary.pwd
+ rm -rf $(abs_top_builddir)/tests/tmp
+ mkdir $(abs_top_builddir)/tests/tmp
+ mkdir $(abs_top_builddir)/tests/tmp/valgrind
+ C_TAP_VALGRIND="$(VALGRIND_COMMAND)" tests/runtests \
+ -l '$(abs_top_srcdir)/tests/TESTS'
+
+# Used by maintainers to reformat all source code using clang-format and
+# excluding some files.
+reformat:
+ find . -name '*.[ch]' \! -name krb5-profile.c \
+ \! -path './cracklib/*' -print \
+ | xargs clang-format -style=file -i