[PATCH] x86: consolidate boot/compressed/Makefile's list of targets

From: Jan Beulich
Date: Fri Sep 04 2009 - 04:09:26 EST


Impact: cleanup

Rather than (inconsistently) having some target specifications
scattered around and some listed at the top of the file, list them all
in one place. And make use of suffix-y to reduce the list's length.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---
arch/x86/boot/compressed/Makefile | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

--- linux-2.6.31-rc8/arch/x86/boot/compressed/Makefile 2009-08-28 14:54:26.000000000 +0200
+++ 2.6.31-rc8-x86-boot-targets/arch/x86/boot/compressed/Makefile 2009-09-02 12:14:16.000000000 +0200
@@ -4,7 +4,12 @@
# create a compressed vmlinux image from the original vmlinux
#

-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
+suffix-$(CONFIG_KERNEL_GZIP) := gz
+suffix-$(CONFIG_KERNEL_BZIP2) := bz2
+suffix-$(CONFIG_KERNEL_LZMA) := lzma
+
+targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.$(suffix-y) \
+ vmlinux.bin.all vmlinux.relocs head_$(BITS).o misc.o piggy.o piggy.S

KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
@@ -30,8 +35,6 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment
$(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy)

-
-targets += vmlinux.bin.all vmlinux.relocs relocs
hostprogs-$(CONFIG_X86_NEED_RELOCS) += relocs

quiet_cmd_relocs = RELOCS $@
@@ -49,13 +52,8 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.al
$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
$(call if_changed,lzma)

-suffix-$(CONFIG_KERNEL_GZIP) := gz
-suffix-$(CONFIG_KERNEL_BZIP2) := bz2
-suffix-$(CONFIG_KERNEL_LZMA) := lzma
-
quiet_cmd_mkpiggy = MKPIGGY $@
cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false )

-targets += piggy.S
$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE
$(call if_changed,mkpiggy)



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/