[PATCH 1/4] kbuild: do not delete $@ explicitly on failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux