All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] kbuild: simplify rules of data compression with size appending
@ 2019-01-17 10:02 Masahiro Yamada
  2019-01-17 10:02 ` [PATCH v2 2/4] s390: make thin archives not directly depend on *.o.chkbss files Masahiro Yamada
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Masahiro Yamada @ 2019-01-17 10:02 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Martin Schwidefsky, linux-s390, Masahiro Yamada, Michal Marek,
	linux-kernel

All the callers of size_append pass $(filter-out FORCE,$^).
Move $(filter-out FORCE,$^) to the definition of size_append.

This makes the callers cleaner because $(call ...) is unneeded
for a macro with no argument.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v2: None

 scripts/Makefile.lib | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ecad15b..ebaa348 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -321,7 +321,7 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 # append the size as a 32-bit littleendian number as gzip does.
 size_append = printf $(shell						\
 dec_size=0;								\
-for F in $1; do								\
+for F in $(filter-out FORCE,$^); do					\
 	fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F);	\
 	dec_size=$$(expr $$dec_size + $$fsize);				\
 done;									\
@@ -335,23 +335,20 @@ printf "%08x\n" $$dec_size |						\
 )
 
 quiet_cmd_bzip2 = BZIP2   $@
-cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
-	bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@
+      cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@
 
 # Lzma
 # ---------------------------------------------------------------------------
 
 quiet_cmd_lzma = LZMA    $@
-cmd_lzma = (cat $(filter-out FORCE,$^) | \
-	lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@
+      cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@
 
 quiet_cmd_lzo = LZO     $@
-cmd_lzo = (cat $(filter-out FORCE,$^) | \
-	lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@
+      cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@
 
 quiet_cmd_lz4 = LZ4     $@
-cmd_lz4 = (cat $(filter-out FORCE,$^) | \
-	lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@
+      cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \
+                  $(size_append)) > $@
 
 # U-Boot mkimage
 # ---------------------------------------------------------------------------
@@ -394,8 +391,7 @@ quiet_cmd_uimage = UIMAGE  $@
 # decompression mode. A BCJ filter isn't used either.
 quiet_cmd_xzkern = XZKERN  $@
 cmd_xzkern = (cat $(filter-out FORCE,$^) | \
-	sh $(srctree)/scripts/xz_wrap.sh && \
-	$(call size_append, $(filter-out FORCE,$^))) > $@
+	sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@
 
 quiet_cmd_xzmisc = XZMISC  $@
 cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-24  4:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-17 10:02 [PATCH v2 1/4] kbuild: simplify rules of data compression with size appending Masahiro Yamada
2019-01-17 10:02 ` [PATCH v2 2/4] s390: make thin archives not directly depend on *.o.chkbss files Masahiro Yamada
2019-01-18  9:22   ` Heiko Carstens
2019-01-17 10:02 ` [PATCH v2 3/4] kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^) Masahiro Yamada
2019-01-17 10:02   ` Masahiro Yamada
2019-01-17 10:02   ` [PATCH v2 3/4] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^) Masahiro Yamada
2019-01-21 15:53   ` [PATCH v2 3/4] kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^) Rob Herring
2019-01-21 15:53     ` Rob Herring
2019-01-17 10:02 ` [PATCH v2 4/4] kbuild: remove unnecessary in-subshell execution Masahiro Yamada
2019-01-24  4:27 ` [PATCH v2 1/4] kbuild: simplify rules of data compression with size appending Masahiro Yamada

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.