All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: barebox@lists.infradead.org
Cc: Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 1/4] kbuild: do not delete $@ explicitly on failure
Date: Thu, 30 Apr 2020 14:13:54 +0900	[thread overview]
Message-ID: <20200430051357.766084-1-masahiroy@kernel.org> (raw)

The .DELETE_ON_ERROR special target is specified in scripts/Kbuild.include

You do not need to delete $@ explicitly when the command fails.
GNU Make automatically does it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile                | 6 +-----
 arch/arm/tools/Makefile | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index de9b40ade..967c27909 100644
--- a/Makefile
+++ b/Makefile
@@ -643,11 +643,7 @@ define rule_barebox__
 
 	$(Q)$(if $($(quiet)cmd_sysmap),                                      \
 	  echo '  $($(quiet)cmd_sysmap)  System.map' &&)                     \
-	$(cmd_sysmap) $@ System.map;                                         \
-	if [ $$? -ne 0 ]; then                                               \
-		rm -f $@;                                                    \
-		false;                                                       \
-	fi;
+	$(cmd_sysmap) $@ System.map
 endef
 
 ifdef CONFIG_KALLSYMS
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 67ae9e701..bff825e58 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -7,4 +7,4 @@
 include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
 	$(Q)$(kecho) '  Generating $@'
 	$(Q)mkdir -p $(dir $@)
-	$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
+	$(Q)$(AWK) -f $^ > $@
-- 
2.25.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2020-04-30  5:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30  5:13 Masahiro Yamada [this message]
2020-04-30  5:13 ` [PATCH 2/4] kbuild: sync filechk rule with Linux 5.7-rc2 Masahiro Yamada
2020-04-30  5:13 ` [PATCH 3/4] kbuild: sync if_changed and friends " Masahiro Yamada
2020-04-30  5:13 ` [PATCH 4/4] kbuild: sync scripts/Kbuild.include " Masahiro Yamada
2020-05-04  7:00 ` [PATCH 1/4] kbuild: do not delete $@ explicitly on failure Sascha Hauer

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=20200430051357.766084-1-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=barebox@lists.infradead.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.