Add a script 'check_headers_and_includes' to check that #include directives
are not against the grain.
Wrap this script together with 'check_makefile_consistency' into
'post_regtest_checks' and invoke that from the toplevel Makefile. So we can
easily add new checkers in the future.

Add a new make target 'post-regtest-checks' to just run those checks
and nothing else.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13570 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/tests/post_regtest_checks b/tests/post_regtest_checks
new file mode 100755
index 0000000..8024f40
--- /dev/null
+++ b/tests/post_regtest_checks
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+#-------------------------------------------------------------------
+#
+# This script is invoked after regression testing has finished
+# It performs various consistency checks.
+#
+# Arguments passed to this script are (from left to right)
+# - absolute path name of valgrind's root directory
+# - list of directories being passed to check_makefile_consistency
+#
+#-------------------------------------------------------------------
+
+# echo "$@"
+
+abs_top_srcdir="$1"
+test_dir="$abs_top_srcdir/tests"
+shift
+
+errors=0
+
+#-------------------------------------------------------------------
+
+echo "...checking makefile consistency"
+$test_dir/check_makefile_consistency "$@"
+if [ $? != 0 ]; then
+   errors=1
+fi
+
+#-------------------------------------------------------------------
+
+echo "...checking header files and include directives"
+$test_dir/check_headers_and_includes "$abs_top_srcdir"
+if [ $? != 0 ]; then
+   errors=1
+fi
+
+exit $errors