views:

266

answers:

2

I'm building a custom Ubuntu kernel and have modified one of the source files. When I issue the build command:

NOEXTRAS=1 skipabi=true skipmodule=true fakeroot debian/rules binary-insp8600

it rebuilds the debs, but none of the modified source files are rebuilt.

What's up? Do I have to do a completely clean rebuild every time I modify a source file?

That doesn't make any sense.

The file modified was ./init/main.c.

As a note binary-insp8600 is a custom flavor I created for my Inspiron 8600 laptop.

A: 

You shouldn't have to do a clean build if the dependancies in the Makefile are correct.

Is the file you changed a header file? If it is then run makedepend to add the header file dependencies automatically :)

If it isn't a header file then their really should be a dependency in the Makefile if it is part of the compilation, have a search and make sure the target you are using depends on the module you want to compile

hhafez
No, I modified ./init/main.c
Robert S. Barnes
Did you search for main in your Makefile (not main.c)? Is it there? It must be if it is ever to be compiled.
hhafez
Of course it's in the make file, as you say - how would it get compiled in the first place otherwise?
Robert S. Barnes
+1  A: 

debian/rules is not the kernel Makefile. It has no way of knowing the file you edited is a dependency of the final kernel, since these dependencies are in the real Makefile.

In fact, I would expect the debian/rules build target (the one which actually does the compilation) to depend only on a "flag" file it creates after finishing the build. If that is the case, a simple workaround would be to remove that "flag" file; it would then compile everything again (by calling the kernel's Makefile, which would know how to do a partial rebuild. Of course, that's assuming the build target does not try to be tidy and do a make clean or equivalent...)

(I did not look at the debian/rules for the package you are using, so I might be wrong, but at least it is a start.)

CesarB
Sounds like a good place to start looking.
Robert S. Barnes
Good guess. There is a directory debian/stamps which contains build stamps. Delete those and it will re-run make.
Robert S. Barnes