Skip to contentSkip to conversation

A little improvement of Kbuild script and Makefile cleanup

PATCH New Masahiro Yamada 2 participants 5 messages Sep 4, 2014 – Sep 17, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

cover A little improvement of Kbuild script and Makefile cleanup

1/2 imports a build script update from Linux.

2/2 refactors examples/standalone/Makefile based on 1/2.

Masahiro Yamada (2):
scripts/Makefile.clean: clean also $(extra-m) and $(extra-)
kbuild: standalone: simplify clean-files

 examples/standalone/Makefile | 2 +-
 scripts/Makefile.clean       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 scripts/Makefile.clean: clean also $(extra-m) and $(extra-)

This commit is a backport from Linux Kernel,
commit 9d5db8949f1ecf4019785b04d8986835d3c0e99e,
written by me.

---

This patch was well-reviewed on Linux Kbuild ML and is already in the Linux mainline.
It is surely safe.

 scripts/Makefile.clean | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/Makefile.clean +2 -2
index d6dcd47..88f14e2 100644
@@ -45,8 +45,8 @@ subdir-ymn	:= $(foreach f, $(subdir-ymn), \
 # build a list of files to remove, usually relative to the current
 # directory
 
-__clean-files	:= $(extra-y) $(always)                  \
-		   $(targets) $(clean-files)             \
+__clean-files	:= $(extra-y) $(extra-m) $(extra-)       \
+		   $(always) $(targets) $(clean-files)   \
 		   $(host-progs)                         \
 		   $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/2 scripts/Makefile.clean: clean also $(extra-m) and $(extra-)

Quoted 5 lines · Masahiro Yamada

This commit is a backport from Linux Kernel,
commit 9d5db8949f1ecf4019785b04d8986835d3c0e99e,
written by me.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140916/8909fe73/attachment.pgp>
#3 lore raw

PATCH 2/2 kbuild: standalone: simplify clean-files

In reply to Masahiro Yamada

Files added $(extra-) are removed by "make clean". Besides, wildcard "*.srec *.bin" is simpler.

---

 examples/standalone/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/standalone/Makefile +1 -1
index 2dacba2..0863a8c 100644
@@ -22,7 +22,7 @@ extra-$(CONFIG_PPC)                += sched
 ELF := $(strip $(extra-y))
 
 extra-y += $(addsuffix .srec,$(extra-y)) $(addsuffix .bin,$(extra-y))
-clean-files  := $(extra-) $(addsuffix .srec,$(extra-)) $(addsuffix .bin,$(extra-))
+clean-files  := *.srec *.bin
 
 COBJS	:= $(ELF:=.o)
 
Signature · 1 line
1.9.1
#4 lore raw

PATCH 2/2 kbuild: standalone: simplify clean-files

Quoted 4 lines · Masahiro Yamada

Files added $(extra-) are removed by "make clean". Besides, wildcard "*.srec *.bin" is simpler.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140916/36aedada/attachment.pgp>