From: Timo Sirainen Date: Tue, 13 Apr 2010 13:02:49 +0000 (+0300) Subject: make distcheck now runs code via clang static analyzer if it exists. X-Git-Tag: 2.0.beta5~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6496ae13bb37cf21ea53ea468b5055720f30c7ab;p=thirdparty%2Fdovecot%2Fcore.git make distcheck now runs code via clang static analyzer if it exists. --HG-- branch : HEAD --- diff --git a/Makefile.am b/Makefile.am index ff031be5ee..1c3265bf9f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -67,3 +67,15 @@ install-exec-hook: 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