mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
0425d58852
Only down to tests/zfs-tests/tests, but pull out C programs into the main Makefile ‒ this means we get correct dependency tracking for all programs (and parallelise across them) dist diff: -zfs-2.1.99/tests/zfs-tests/tests/stress/ -zfs-2.1.99/tests/zfs-tests/tests/stress/Makefile.am -zfs-2.1.99/tests/zfs-tests/tests/stress/Makefile.in Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
# Global ShellCheck exclusions:
|
|
#
|
|
# ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090]
|
|
# Not following: a was not specified as input (see shellcheck -x). [SC1091]
|
|
# Prefer putting braces around variable references even when not strictly required. [SC2250]
|
|
# In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions
|
|
# In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions
|
|
|
|
SHELLCHECKSCRIPTS =
|
|
|
|
JUST_SHELLCHECK_OPTS = $(addprefix shellcheck-here-,$(subst /,^,$(1)))
|
|
JUST_CHECKBASHISMS_OPTS = $(addprefix checkbashisms-here-,$(subst /,^,$(1)))
|
|
SHELLCHECK_OPTS = $(call JUST_SHELLCHECK_OPTS,$(1)) $(call JUST_CHECKBASHISMS_OPTS,$(1))
|
|
|
|
PHONY += shellcheck
|
|
|
|
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
|
shellcheck-here-%:
|
|
if HAVE_SHELLCHECK
|
|
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
|
else
|
|
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
|
endif
|
|
|
|
shellcheck: $(SHELLCHECKSCRIPTS) $(call JUST_SHELLCHECK_OPTS,$(SHELLCHECKSCRIPTS))
|
|
|
|
|
|
PHONY += checkbashisms
|
|
|
|
# command -v *is* specified by POSIX and every shell in existence supports it
|
|
_BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
|
|
checkbashisms-here-%:
|
|
if HAVE_CHECKBASHISMS
|
|
! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
|
|
checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
|
|
else
|
|
@echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
|
|
endif
|
|
|
|
checkbashisms: $(SHELLCHECKSCRIPTS) $(call JUST_CHECKBASHISMS_OPTS,$(SHELLCHECKSCRIPTS))
|