All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] dt-bindings: Remove example file on dt-extract-example error
Date: Tue, 10 May 2022 17:13:32 -0500	[thread overview]
Message-ID: <20220510221333.2770571-1-robh@kernel.org> (raw)

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


             reply	other threads:[~2022-05-10 22:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 22:13 Rob Herring [this message]
2022-05-11  0:27 ` [PATCH] dt-bindings: Remove example file on dt-extract-example error Masahiro Yamada
2022-05-17  1:12   ` Rob Herring
2022-05-17  3:02     ` Masahiro Yamada
2022-05-17 13:38       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220510221333.2770571-1-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.