treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / Documentation / devicetree / bindings / Makefile
blob646cb35253733ee6cc0631547e1de204eef3c7ca
1 # SPDX-License-Identifier: GPL-2.0
2 DT_DOC_CHECKER ?= dt-doc-validate
3 DT_EXTRACT_EX ?= dt-extract-example
4 DT_MK_SCHEMA ?= dt-mk-schema
5 DT_MK_SCHEMA_FLAGS := $(if $(DT_SCHEMA_FILES), -u)
7 quiet_cmd_chk_binding = CHKDT $(patsubst $(srctree)/%,%,$<)
8 cmd_chk_binding = $(DT_DOC_CHECKER) -u $(srctree)/$(src) $< ; \
9 $(DT_EXTRACT_EX) $< > $@
11 $(obj)/%.example.dts: $(src)/%.yaml FORCE
12 $(call if_changed,chk_binding)
14 DT_TMP_SCHEMA := processed-schema.yaml
16 quiet_cmd_mk_schema = SCHEMA $@
17 cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs)
19 DT_DOCS = $(shell \
20 cd $(srctree)/$(src) && \
21 find * \( -name '*.yaml' ! \
22 -name $(DT_TMP_SCHEMA) ! \
23 -name '*.example.dt.yaml' \) \
26 DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
28 ifeq ($(CHECK_DTBS),)
29 extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
30 extra-y += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
31 endif
33 $(obj)/$(DT_TMP_SCHEMA): $(DT_SCHEMA_FILES) FORCE
34 $(call if_changed,mk_schema)
36 extra-y += $(DT_TMP_SCHEMA)