blob: 0ea4e5d1e66b111f0906154acc5af8f7898de0fa [file] [log] [blame]
Joey Armstrong7f8436c2023-07-09 20:23:27 -04001# -*- 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# -----------------------------------------------------------------------
10gen-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## -----------------------------------------------------------------------
23gen-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]