build: fix make warning if there is no cppcheck
authorBertrand Marquis <bertrand.marquis@arm.com>
Wed, 25 May 2022 09:07:46 +0000 (11:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 May 2022 09:07:46 +0000 (11:07 +0200)
commit890b23a43345785aafd5e55ccd91a80d3ad76f36
tree8580e68bdc3b81ed20cc16966747195cc11dbf0a
parentf64c55b2f1b67c4d5e53146a7940707cb7671cee
build: fix make warning if there is no cppcheck

If cppcheck is not present, the following warning appears during build:
which: no cppcheck in ([...])
/bin/sh: cppcheck: command not found

Fix the problem by using shell code inside the cppcheck-version rule to
also prevent unneeded call of which when something else than cppcheck is
built.

Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/Makefile