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