* [PATCH] x86: consolidate boot/compressed/Makefile's list of targets
@ 2009-09-04 8:09 Jan Beulich
2009-09-04 16:10 ` H. Peter Anvin
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2009-09-04 8:09 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
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@novell.com>
---
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)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] x86: consolidate boot/compressed/Makefile's list of targets
2009-09-04 8:09 [PATCH] x86: consolidate boot/compressed/Makefile's list of targets Jan Beulich
@ 2009-09-04 16:10 ` H. Peter Anvin
0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2009-09-04 16:10 UTC (permalink / raw)
To: Jan Beulich; +Cc: mingo, tglx, linux-kernel
On 09/04/2009 01:09 AM, Jan Beulich wrote:
> 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@novell.com>
>
I had been meaning to get around to cleaning this up, but this is IMNSHO
completely backwards. Distributing targets so that all the stuff that
produces a particular file is in one place is IMO a much cleaner style.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-04 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-04 8:09 [PATCH] x86: consolidate boot/compressed/Makefile's list of targets Jan Beulich
2009-09-04 16:10 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox