Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
| 3 | # Intent: |
| 4 | # o Construct a find command able to gather shell files for checking. |
| 5 | # ----------------------------------------------------------------------- |
| 6 | |
| 7 | ## ----------------------------------------------------------------------- |
| 8 | ## Intent: Construct a string for invoking find \( excl-pattern \) -prune |
| 9 | # ----------------------------------------------------------------------- |
| 10 | gen-shellcheck-find-excl = \ |
| 11 | $(strip \ |
| 12 | -name '__ignored__' \ |
| 13 | $(foreach dir,$($(1)),-o -name $(dir)) \ |
| 14 | ) |
| 15 | |
| 16 | ## ----------------------------------------------------------------------- |
| 17 | ## Intent: Construct a find command to gather a list of python files |
| 18 | ## with exclusions. |
| 19 | ## ----------------------------------------------------------------------- |
| 20 | ## Usage: |
| 21 | # $(activate) & $(call gen-python-find-cmd) | $(args-n1) pylint |
| 22 | ## ----------------------------------------------------------------------- |
| 23 | gen-shellcheck-find-cmd = \ |
| 24 | $(strip \ |
| 25 | find . \ |
| 26 | \( $(call gen-shellcheck-find-excl,onf-excl-dirs) \) -prune \ |
| 27 | -o \( -iname '*.sh' \) \ |
| 28 | -print0 \ |
| 29 | ) |
| 30 | |
| 31 | # [EOF] |