blob: 49d4cb0c5fb03c5aa3b4920c8641ed904c18b7f5 [file] [log] [blame]
Joey Armstronga5278142023-06-28 16:56:54 -04001# -*- 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# -----------------------------------------------------------------------
11gen-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## -----------------------------------------------------------------------
24gen-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]