lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dt-bindings: Add a help message when dtschema tools are missing
Date
The dtschema version check works, but is not that clear when dtschema is
neither installed nor in the PATH. Add a separate check and message if
dt-doc-validate is not found.

Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/Makefile | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 8d6d912c6a6a..001b4f62b741 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -9,6 +9,10 @@ DT_SCHEMA_MIN_VERSION = 2021.2.1

PHONY += check_dtschema_version
check_dtschema_version:
+ @which $(DT_DOC_CHECKER) >/dev/null || \
+ { echo "Error: '$(DT_DOC_CHECKER)' not found!" \
+ "\nEnsure dtschema python package is installed and in your PATH." \
+ "\nCurrent PATH is:\n$$PATH\n" >&2; false; }
@{ echo $(DT_SCHEMA_MIN_VERSION); \
$(DT_DOC_CHECKER) --version 2>/dev/null || echo 0; } | sort -Vc >/dev/null || \
{ echo "ERROR: dtschema minimum version is v$(DT_SCHEMA_MIN_VERSION)" >&2; false; }
--
2.32.0
\
 
 \ /
  Last update: 2021-10-26 19:18    [W:0.039 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site