From: Andrea Bolognani Date: Thu, 1 Mar 2018 16:32:08 +0000 (+0100) Subject: src: Fix checking for clang X-Git-Tag: v4.1.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65024c8939ef80fc5ccb05bd9bd7ecd70e37de3c;p=thirdparty%2Flibvirt.git src: Fix checking for clang The check was trying to use the shell variable $CC instead of the make variable $(CC); it also interpreted grep's return code wrong: 1 means the provided pattern was *not* matched. As a result, pdwtags was never run, not even when building with gcc. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrangé --- diff --git a/src/Makefile.am b/src/Makefile.am index 5794915246..3bf2da543d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -668,8 +668,7 @@ struct_prefix = ($(libs_prefix)|$(other_prefix)) # which causes the comparison against expected output to fail, so skip # if using clang as CC. PDWTAGS = \ - $(AM_V_GEN)$CC -v 2>&1 | grep -q clang; \ - if test $$? == 1; then \ + $(AM_V_GEN)if $(CC) -v 2>&1 | grep -q clang; then \ echo 'WARNING: skipping pdwtags test with Clang' >&2; \ exit 0; \ fi; \