]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: boot/compressed/Makefile: fix "make clean"
authorH. Peter Anvin <hpa@zytor.com>
Thu, 4 Sep 2008 13:19:45 +0000 (06:19 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 4 Sep 2008 13:19:45 +0000 (06:19 -0700)
The Kbuild variable "targets" is supposed to be
configuration-independent and reflect "all possible targets".  This is
required to make "make clean" work properly.

Therefore, move all manipulation of "targets" as well as custom rules
out of the x86-32 ifdef statement.  Only leave inside the ifdefs the
things that are genuinely configuration-dependent.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/boot/compressed/Makefile

index 92fdd35bd93e4fca0ac3b7a2d6ed7736f8094897..1771c804e02f57b26d5d4f9f1db8cdb1f7a4ed62 100644 (file)
@@ -27,9 +27,8 @@ $(obj)/vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
 
 
-ifeq ($(CONFIG_X86_32),y)
-targets += vmlinux.bin.all vmlinux.relocs
-hostprogs-y := relocs
+targets += vmlinux.bin.all vmlinux.relocs relocs
+hostprogs-$(CONFIG_X86_32) += relocs
 
 quiet_cmd_relocs = RELOCS  $@
       cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $<
@@ -43,6 +42,8 @@ quiet_cmd_relocbin = BUILD   $@
 $(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE
        $(call if_changed,relocbin)
 
+ifeq ($(CONFIG_X86_32),y)
+
 ifdef CONFIG_RELOCATABLE
 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
        $(call if_changed,gzip)
@@ -59,6 +60,5 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
 LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
 endif
 
-
 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
        $(call if_changed,ld)