From: Joe Lawrence Date: Tue, 10 Mar 2026 20:37:45 +0000 (-0400) Subject: livepatch/klp-build: add Makefile with check target X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0573bcc4ffca498a6c644b0e1ccbe1a6d9b96a5c;p=thirdparty%2Fkernel%2Flinux.git livepatch/klp-build: add Makefile with check target Add a standalone Makefile with a 'check' target that runs static code analysis (shellcheck) on the klp-build script(s). This is intended strictly as a development aid. Acked-by: Song Liu Signed-off-by: Joe Lawrence Link: https://patch.msgid.link/20260310203751.1479229-7-joe.lawrence@redhat.com Signed-off-by: Josh Poimboeuf --- diff --git a/scripts/livepatch/Makefile b/scripts/livepatch/Makefile new file mode 100644 index 0000000000000..17b590213740c --- /dev/null +++ b/scripts/livepatch/Makefile @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0 +# Standalone Makefile for developer tooling (not part of kbuild). + +SHELLCHECK := $(shell which shellcheck 2> /dev/null) + +SRCS := \ + klp-build + +.DEFAULT_GOAL := help +.PHONY: help +help: + @echo " check - Run shellcheck on $(SRCS)" + @echo " help - Show this help message" + +.PHONY: check +check: +ifndef SHELLCHECK + $(error shellcheck is not installed. Please install it to run checks) +endif + @$(SHELLCHECK) $(SHELLCHECK_OPTIONS) $(SRCS)