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=dllYeqMO; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 627185A0652 for ; Tue, 21 Apr 2026 05:23:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1776741822; bh=UR1rxWrqNIyd/rSq2sBxqKUiNpKHT5RWw6XOuHf/tgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dllYeqMO/zRHH5kXfZ7p+fNs+iTr20lByOhtm7xzhkNpDrt2bPNnX5PneMpf1wRdL W+dW6W9nUZm9Qtk5Tg8PnGItdi/fAli1gJUm9z7eEhd2NLOV27U8PhOADn+96xPyp6 KnIZ86MDwW2VOnu1688kg1V/BvPrWeUvT6W2FdsFXoMquN8h+PwCJ8W5NBWfU66l0U 1y06E2Uh1A4SHcjZEL8cPQjfP8g4TfxhyanlB+cjNSnfWw/Adcgw2+KBqp0Wr0A59N J+Ya5ye5b3+I+nf1YrlyKCt7K1dKUxNE1C+8473QxQ1Z3tqIeSteU1dwAjTKRBj5nT o03VJKq9fQMPg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4g073y5TD2z4wD3; Tue, 21 Apr 2026 13:23:42 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v2 09/13] Makefile: Split static checker targets Date: Tue, 21 Apr 2026 13:23:34 +1000 Message-ID: <20260421032338.1909084-10-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260421032338.1909084-1-david@gibson.dropbear.id.au> References: <20260421032338.1909084-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: R6JVMU4GB5A5QJSXNTWS4TOHRCRA4TXJ X-Message-ID-Hash: R6JVMU4GB5A5QJSXNTWS4TOHRCRA4TXJ 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 9cb5e1ba..b8a3cf9e 100644 --- a/Makefile +++ b/Makefile @@ -183,8 +183,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 \ @@ -199,5 +204,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.53.0