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=dXool6XT; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id CF5F05A0274 for ; Tue, 21 Apr 2026 04:43:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1776739427; bh=UR1rxWrqNIyd/rSq2sBxqKUiNpKHT5RWw6XOuHf/tgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dXool6XT+CJj1y0BL6k8ULeRTdnWjL5bGtobbDgDmPgndCbvEAL5NzsDJu1B6jqCW lhiANn7pjf0XT2q+7hrFqOSockD9PvL8fr13h1wIszv4eiij/Yqg3ZTICTcAJ83SRW WzrAXZAzj/Ug5H4txF/tkciShbZlvklmmxJUVsibMPn88rq9K2Zl5MxBUGJSvJscVG Y4jRh2ojdTtCpUyu4DfkRGGzVAvNf4tnmCu7ixk3mKydVVqQ33wnhZUUiCG907rCHn wPUXwuGSBbMG/jLc7XY4AanzZ0oYWMoZG4zzDk6jKq2QRA3r+KIfyWpHRGbDVZFBhO LXdCVhZwruWhw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4g069v3G1Fz4wDx; Tue, 21 Apr 2026 12:43:47 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 09/13] Makefile: Split static checker targets Date: Tue, 21 Apr 2026 12:43:40 +1000 Message-ID: <20260421024344.1379633-10-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260421024344.1379633-1-david@gibson.dropbear.id.au> References: <20260421024344.1379633-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: FVCC7XBDGMQWUZYXHJRQPRXFOJ5W7HR4 X-Message-ID-Hash: FVCC7XBDGMQWUZYXHJRQPRXFOJ5W7HR4 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