[libvirt] [PATCH 2/7] build: set STATIC_ANALYSIS when running via clang or coverity
Daniel P. Berrange
berrange at redhat.com
Wed Apr 14 17:39:55 UTC 2010
On Wed, Apr 14, 2010 at 06:02:31PM +0200, Jim Meyering wrote:
> From: Jim Meyering <meyering at redhat.com>
>
> * configure.ac (STATIC_ANALYSIS): Define when run via clang's
> scan-build or coverity-prevent's cov-build.
> Use the CLANG_CC and COVERITY_BUILD_COMMAND envvars as witnesses.
> ---
> configure.ac | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3505b4a..664eaf0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2000,6 +2000,12 @@ AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])
> test "x$srcdir" = x. && ! test -f COPYING &&
> cp -f COPYING.LIB COPYING
>
> +# Detect when running under the clang static analyzer's scan-build driver
> +# or Coverity-prevent's cov-build. Define STATIC_ANALYSIS accordingly.
> +test -n "$$CCC_ANALYZER_ANALYSIS$COVERITY_BUILD_COMMAND" && t=1 || t=0
> +AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
> + [Define to 1 when performing static analysis.])
> +
> AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
> docs/schemas/Makefile \
> gnulib/lib/Makefile \
ACK with the changes already discussed
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list