3 help: ## Display this help
4 @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
6 allcheck: codecheck spellcheck ## Run codecheck and spellcheck
8 codecheck: shellcheck pythoncheck ## Run shellcheck and pythoncheck
11 shellcheck: ## Run shellcheck
13 @for shellfile in $$(ls usr_bin/* usr_sbin/* usr_share/*); do
14 @ [ "$${shellfile}" = "usr_bin/iimage" ] && continue
15 @ [ "$${shellfile}" = "usr_sbin/make_chroot_jail" ] && continue
16 @ file "$${shellfile}" | grep -q shell && (shellcheck -x "$${shellfile}" || RETURN=1)
21 pythoncheck: ## Run pythoncheck (flakecheck, isortcheck + blackcheck)
23 @for pythonfile in usr_bin/* usr_sbin/* usr_share/*; do
24 @ if head -1 "$${pythonfile}" | grep -q "python"; then
25 @ flake8 --max-line-length 88 "$${pythonfile}" || RETURN=1
26 @ isort --check "$${pythonfile}" || RETURN=1
27 @ black --check "$${pythonfile}" || RETURN=1
33 flakecheck: ## Run flake8 only
35 @for pythonfile in usr_bin/* usr_sbin/* usr_share/*; do
36 @ if head -1 "$${pythonfile}" | grep -q "python"; then
37 @ flake8 --max-line-length 88 "$${pythonfile}" || RETURN=1
43 isortcheck: ## Run isort --check only
45 @for pythonfile in usr_bin/* usr_sbin/* usr_share/*; do
46 @ if head -1 "$${pythonfile}" | grep -q "python"; then
47 @ isort --check "$${pythonfile}" || RETURN=1
53 blackcheck: ## Run black --check only
55 @for pythonfile in usr_bin/* usr_sbin/* usr_share/*; do
56 @ if head -1 "$${pythonfile}" | grep -q "python"; then
57 @ black --check "$${pythonfile}" || RETURN=1
63 spellcheck: ## Run spellcheck
64 @OUTPUT="$$(spellintian manpages/*)"
66 @if [ -n "$$OUTPUT" ]; then