[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: Fix make warning if there is no cppcheck
- To: Bertrand Marquis <bertrand.marquis@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 20 May 2022 13:06:37 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kxkD9SQPfX+XP4H2QDGmxtlXZBVelTA1FqvdYRuEKxU=; b=Tpj3LoZP2BGmzGXoyCxoq6y1pJU2OHzaGJL4HYjmpvUoHRmtEJjFUHK/WPkuR9NQJ+d6J4hwkEWvdTuTjHt/nv/GQdeWzM4hHAlIYutUdnEbD9LV2V2gEC3UkT18P9UJup3cSFWbTsa7NPJ2qayFmQ8CTT3kbX+4kk2mpFrT+CvFOb6GrB1MjqrkJu5ac9Qq96S/VYNGrgYjCWokxDvbU8iY8V53v/S2xDwCe445K6Rgf7HhEPBMjUc+lD7C+eJ3DtOCq15OjpxuVAwy0AVK56DQGLa2poSHKUxxLiwN+FWEf0/fhi/mk99OnRbubJFUSA13Q34FpQ37RQz1imtICg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oMKo826Y47jxoLHSxNOyR7qbB03g2OnjIn9tSiraheRtkAOKmRYthR9R4sdOfkfjsvBZRTH+yC854e6FlV8W4b5wxflz9n95SoxqkGOZlMsBAsvlNJvH8iG5mEWxTa/ztcvvS07um1Uw2gg/G4jGwfLLF2IB2RcSUjh0D6MqqrsWtYqj42Pyq/I33JO4WF4cXrSshWPpz6tL14JX+Nf8XVrlG5C7kGdfe7SLDPxIDA5UVP9c2jgydMDLpoiUkY7JunFxuVvcpqt7IY402wm1XgI8qtTZLeM1p5c+55KExdeU+Cw1c4hBf4vsu+7nQqANNxBY1fVVAWM7PDXHBAnmpg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 20 May 2022 11:06:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 20.05.2022 12:49, Bertrand Marquis wrote:
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -694,12 +694,13 @@ $(objtree)/%.c.cppcheck: $(srctree)/%.c
> $(objtree)/include/generated/autoconf.h
> $(call if_changed,cppcheck_xml)
>
> cppcheck-version:
> -ifeq ($(shell which $(CPPCHECK)),)
> +ifeq ($(shell which $(CPPCHECK) 2> /dev/null),)
> $(error Cannot find cppcheck executable: $(CPPCHECK))
> -endif
> +else
> ifeq ($(shell $(CPPCHECK) --version | awk '{print ($$2 < 2.7)}'),1)
> $(error Please upgrade your cppcheck to version 2.7 or greater)
> endif
> +endif
While I agree this will silence things, I still would prefer if you
switched to $(if ...) inside the rule - there's no need to invoke the
shell while parsing the makefile. Anything like this only needlessly
slows down the build. Not by much, but it sums up.
Jan
|