On Tue, Jul 17, 2007 at 11:49:42AM -0700, H. Peter Anvin wrote:
> For some reason, everything in arch/i386/boot is rebuilt on every
> compile.  It's not a huge time waster, but it has annoyed people enough
> that they ask me about it.  version.o and setup.elf obviously would,
> since they contain a version string, but none of the other .o files have
> any obvious reason for being rebuild, and the .cmd files don't show any
> dependencies that I would expect to be revved for each revision.
> 
> Help?

Seen it to - but were busy with other stuff.

If you do a
$ make V=2
Then you will notice that kbuild tells you that the .o files are built because
they are not listed in $(targets).

Reading the commonts in scripts/Kbuild.include it says:
"this is most likely a bug in your kbuild file".

So I did the following and it cured it:

[PATCH] x86: do not recompile boot for each build

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index 08678a0..93386a4 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
@@ -39,7 +39,7 @@ setup-y               += printf.o string.o tty.o video.o 
version.o voyager.o
 setup-y                += video-vga.o
 setup-y                += video-vesa.o
 setup-y                += video-bios.o
-
+targets                += $(setup-y)
 hostprogs-y    := tools/build
 
 HOSTCFLAGS_build.o := $(LINUXINCLUDE)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to