lkml.org 
[lkml]   [2022]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dt-bindings: Remove example file on dt-extract-example error
Date
As 'dt-extract-example' writes the example dts files to stdout, a file
is always created even on an error such as Ctrl-C. The resulting empty
file(s) then cause unexpected errors on subsequent builds. Fix this by
removing the output file on any error.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index c9953f86b19d..c9fadff3dd74 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -20,7 +20,7 @@ check_dtschema_version:
{ echo "ERROR: dtschema minimum version is v$(DT_SCHEMA_MIN_VERSION)" >&2; false; }

quiet_cmd_extract_ex = DTEX $@
- cmd_extract_ex = $(DT_EXTRACT_EX) $< > $@
+ cmd_extract_ex = $(DT_EXTRACT_EX) $< > $@ || rm $@

$(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
$(call if_changed,extract_ex)
--
2.34.1
\
 
 \ /
  Last update: 2022-05-11 00:14    [W:0.613 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site