Have check_makẹfile_consistency run at the end of make regtest
This ensures that a missing file in the Makefile is detected,
without blocking the tests.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12456 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.am b/Makefile.am
index 7deb43a..b671713 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -66,10 +66,15 @@
 	cat $(DEFAULT_SUPP_FILES) >> default.supp
 
 ## Preprend @PERL@ because tests/vg_regtest isn't executable
+## Ensure make exits with error if PERL fails or check_makẹfile_consistency fails.
 regtest: check
-	-tests/check_makefile_consistency gdbserver_tests $(TOOLS) $(EXP_TOOLS)
 	gdbserver_tests/make_local_links $(GDB)
-	@PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS)
+	if @PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS) ; then \
+	   tests/check_makefile_consistency gdbserver_tests $(TOOLS) $(EXP_TOOLS); \
+	else \
+	   tests/check_makefile_consistency gdbserver_tests $(TOOLS) $(EXP_TOOLS); \
+	   false; \
+	fi
 nonexp-regtest: check
 	@PERL@ tests/vg_regtest $(TOOLS)
 exp-regtest: check