]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86, realmode: Make sure all generated files are listed in targets
authorH. Peter Anvin <hpa@linux.intel.com>
Wed, 9 May 2012 21:53:01 +0000 (14:53 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 9 May 2012 21:53:01 +0000 (14:53 -0700)
Kbuild expects all generated files to be listed in the targets
variable.  If it isn't, weird things happen.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1336595106-21135-1-git-send-email-jarkko.sakkinen@intel.com
arch/x86/realmode/rm/Makefile

index 1c1d3d3bbee4618ed133781c6b84130d880760b4..5b84a2d308885d9ce8c7e3f861fe269b721f1982 100644 (file)
@@ -7,13 +7,7 @@
 #
 #
 
-always := realmode.bin
-
-realmode-y                     += header.o
-realmode-y                     += trampoline_$(BITS).o
-realmode-y                     += stack.o
-realmode-$(CONFIG_X86_32)      += reboot_32.o
-realmode-$(CONFIG_ACPI_SLEEP)  += $(wakeup-objs)
+always := realmode.bin realmode.relocs
 
 wakeup-objs    := wakeup_asm.o wakemain.o video-mode.o
 wakeup-objs    += copy.o bioscall.o regs.o
@@ -25,6 +19,12 @@ wakeup-objs  += video-vga.o
 wakeup-objs    += video-vesa.o
 wakeup-objs    += video-bios.o
 
+realmode-y                     += header.o
+realmode-y                     += trampoline_$(BITS).o
+realmode-y                     += stack.o
+realmode-$(CONFIG_X86_32)      += reboot_32.o
+realmode-$(CONFIG_ACPI_SLEEP)  += $(wakeup-objs)
+
 targets        += $(realmode-y)
 
 REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
@@ -35,24 +35,30 @@ quiet_cmd_pasyms = PASYMS  $@
       cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \
                   sed $(sed-pasyms) | sort | uniq > $@
 
+targets += pasyms.h
 $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
        $(call if_changed,pasyms)
 
+targets += realmode.lds
 $(obj)/realmode.lds: $(obj)/pasyms.h
 
 LDFLAGS_realmode.elf := --emit-relocs -T
 CPPFLAGS_realmode.lds += -P -C -I$(obj)
 
+targets += realmode.elf
 $(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE
        $(call if_changed,ld)
 
 OBJCOPYFLAGS_realmode.bin := -O binary
 
+targets += realmode.bin
 $(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs
        $(call if_changed,objcopy)
 
 quiet_cmd_relocs = RELOCS  $@
       cmd_relocs = arch/x86/tools/relocs --realmode $< > $@
+
+targets += realmode.relocs
 $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
        $(call if_changed,relocs)