mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
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 <[email protected]> Signed-off-by: Joe Lawrence <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Josh Poimboeuf <[email protected]>
21 lines
480 B
Makefile
21 lines
480 B
Makefile
# 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)
|