dt-bindings: Pass binding directory to validation tools
authorRob Herring <robh@kernel.org>
Thu, 9 May 2019 13:53:44 +0000 (08:53 -0500)
committerRob Herring <robh@kernel.org>
Wed, 22 May 2019 14:01:01 +0000 (09:01 -0500)
In order to have $ref's to schema files within the kernel, we need to
pass the base path of bindings to the schema validation tools.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: devicetree@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/Makefile
scripts/Makefile.lib

index 63b139f9ae287c76273bde4500d5add45a620b2b..8a2774b5834b5bd07d30ac3c544d5672b57ec835 100644 (file)
@@ -5,7 +5,7 @@ DT_MK_SCHEMA ?= dt-mk-schema
 DT_MK_SCHEMA_FLAGS := $(if $(DT_SCHEMA_FILES), -u)
 
 quiet_cmd_chk_binding = CHKDT   $(patsubst $(srctree)/%,%,$<)
-      cmd_chk_binding = $(DT_DOC_CHECKER) $< ; \
+      cmd_chk_binding = $(DT_DOC_CHECKER) -u $(srctree)/$(src) $< ; \
                         $(DT_EXTRACT_EX) $< > $@
 
 $(obj)/%.example.dts: $(src)/%.yaml FORCE
index 1b412d4394aecc8b830edfacab968864cad1f7b9..f1f38c8cdc7481250e9904945702a6f1932868a8 100644 (file)
@@ -298,7 +298,7 @@ DT_BINDING_DIR := Documentation/devicetree/bindings
 DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.yaml
 
 quiet_cmd_dtb_check =  CHECK   $@
-      cmd_dtb_check =  $(DT_CHECKER) -p $(DT_TMP_SCHEMA) $@ ;
+      cmd_dtb_check =  $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ ;
 
 define rule_dtc_dt_yaml
        $(call cmd_and_fixdep,dtc,yaml)