dt-bindings: kbuild: Make DT_SCHEMA_LINT a recursive variable
authorNathan Chancellor <nathan@kernel.org>
Tue, 15 Mar 2022 20:25:43 +0000 (13:25 -0700)
committerRob Herring <robh@kernel.org>
Wed, 23 Mar 2022 23:10:00 +0000 (18:10 -0500)
A recent change added a warning when yamllint is not installed, as it is
needed for 'make dt_binding_check'. However, it also changed
DT_SCHEMA_LINT to be a simple make variable, which is evaluated when a
Makefile is evaluated. This causes a warning when running 'make clean',
as Documentation/devicetree/bindings/Makefile has a "clean-files"
variable:

  $ make -s clean
  which: no yamllint in (...)
  warning: python package 'yamllint' not installed, skipping

Make DT_SCHEMA_LINT a recursive variable so it is evaluated only when it
is used. The warning still triggers when 'make dt_binding_check' is run.

Fixes: b3e664a7f449 ("dt-bindings: kbuild: Print a warning if yamllint is not found")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220315202542.2071351-1-nathan@kernel.org
Documentation/devicetree/bindings/Makefile

index e594e5898be01c4e3faaf9f06532b868ae9fcb05..c9953f86b19d618b5afe9bfbadd2c1f350675504 100644 (file)
@@ -3,7 +3,7 @@ DT_DOC_CHECKER ?= dt-doc-validate
 DT_EXTRACT_EX ?= dt-extract-example
 DT_MK_SCHEMA ?= dt-mk-schema
 
-DT_SCHEMA_LINT := $(shell which yamllint || \
+DT_SCHEMA_LINT = $(shell which yamllint || \
   echo "warning: python package 'yamllint' not installed, skipping" >&2)
 
 DT_SCHEMA_MIN_VERSION = 2022.3