changeset 11140:762a4216352f HEAD

make distcheck now runs code via clang static analyzer if it exists.
author Timo Sirainen <tss@iki.fi>
date Tue, 13 Apr 2010 16:02:49 +0300
parents caf8c5d39ab2
children 4ade4d8c66c5
files Makefile.am
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Tue Apr 13 15:49:14 2010 +0300
+++ b/Makefile.am	Tue Apr 13 16:02:49 2010 +0300
@@ -67,3 +67,15 @@
 CLEANFILES = $(datafiles)
 
 DISTCLEANFILES = $(top_builddir)/dovecot-version.h
+
+distcheck-hook:
+	if which scan-build > /dev/null; then \
+	  cd $(distdir)/_build; \
+	  scan-build -o scan-reports ../configure --with-ldap=auto --with-pgsql=auto --with-mysql=auto --with-sqlite=auto --with-solr=auto --with-gssapi=auto --with-libwrap=auto; \
+	  rm -rf scan-reports; \
+	  scan-build -o scan-reports make 2>&1 || exit 1; \
+	  if ! rmdir scan-reports 2>/dev/null; then \
+	    exit 1; \
+	  fi; \
+	  cd ../..; rm -rf $(distdir)/_build/*; \
+	fi