From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=iRA2s8q1; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 0809A5A0262 for ; Tue, 12 May 2026 07:53:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1778565179; bh=NR1fssI3CqL8XsnhyVas6WtQwDbrnBx9Yq7Shogv5GQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iRA2s8q1XadzVrmD2dVriftt7KNTq1sPPq77sju/vIhngfufYUgZEZXrH1Ty2Mh5p yf/QJOYd54iyIalyMFrL8utQ4lPOhnEDNuBlDlfisWVO8XPWrIB4LPb7rOMFqUTe97 9r0FQFWVYWCXKf4siAQl7olC735Gwbj30RmobAVVg63doI8SmhQ+Rk5B9N7qkfncOE FAvz04YWVRNh2lAG5OVoPNaBNRqdCyBXTNqR/j09MB28qifOgtViX9QLawx03OzP0C UlQAzqMXzl7X461VV66j9yTpYwYIiioUU/veqZVI8ErGLW+kFHv4S3mL3tmFuQGwVj sCb4QSEzUFeXQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gF5NW1myvz4wTS; Tue, 12 May 2026 15:52:59 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v3 08/12] Makefile: Split static checker targets Date: Tue, 12 May 2026 15:52:52 +1000 Message-ID: <20260512055256.1800449-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260512055256.1800449-1-david@gibson.dropbear.id.au> References: <20260512055256.1800449-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: RDGBI6RAUQPDB3VITEEHPJ6WJ3JE6PD4 X-Message-ID-Hash: RDGBI6RAUQPDB3VITEEHPJ6WJ3JE6PD4 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Currently we have a single 'cppcheck' and 'clang-tidy' target which checks passt. However, it doesn't check the additional binaries, qrap and passt-repair. In preparation for running the static checkers on those as well, split the targets into a top-level rule and a pattern rule which we will be able to reuse. Signed-off-by: David Gibson --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c6dbbc67..36a2654b 100644 --- a/Makefile +++ b/Makefile @@ -193,8 +193,13 @@ docs: README.md CLANG_TIDY = clang-tidy CLANG_TIDY_FLAGS = -DCLANG_TIDY_58992 -clang-tidy: $(PASST_SRCS) - $(CLANG_TIDY) $^ -- $(BASE_CPPFLAGS) $(CPPFLAGS) $(CLANG_TIDY_FLAGS) +clang-tidy: passt.clang-tidy + +.PHONY: %.clang-tidy +%.clang-tidy: + $(CLANG_TIDY) $(filter %.c,$^) -- $(BASE_CPPFLAGS) $(CPPFLAGS) $(CLANG_TIDY_FLAGS) + +passt.clang-tidy: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h CPPCHECK = cppcheck CPPCHECK_FLAGS = --std=c11 --error-exitcode=1 --enable=all --force \ @@ -209,5 +214,10 @@ CPPCHECK_FLAGS = --std=c11 --error-exitcode=1 --enable=all --force \ --suppress=unusedStructMember \ -D CPPCHECK_6936 -cppcheck: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h +cppcheck: passt.cppcheck + +.PHONY: %.cppcheck +%.cppcheck: $(CPPCHECK) $(CPPCHECK_FLAGS) $(BASE_CPPFLAGS) $^ + +passt.cppcheck: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h -- 2.54.0