[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

make -f debian/rules build - does not correctly rebuild files- why?



I found that rebuilding the kernel package does NOT rebuild  the .o
files which I found very surprising.
In fact after much painful experimenting I was forced do a clean to
get my modified .c files to be compiled!

Basically I was trying to build a new kernel in order to debug
   bug844788 "hibernate: suspends ok but hangs on restore after
decompressing with stretch kernel on macbook pro"

when I found the kernel was *unchanged* from the original version no
matter how I rebuilt the kernel. My confusion wasn't helped by the
fact the the timestamp in the kernel is based on the debian/changelog
:-(

After much painful building packages/installing and getting *NO*
change just got more desperate and in the end I just removed a .o

  rm linux-4.8.5/debian/build/build_amd64_none_amd64/kernel/power/swap.o

Then I found nothing would rebuild that .o - even though it spend much
time generating packages and so forth!
I was using dpkg-buildpackage with -nc (no clean)

Then tried plain make more and more make targets to see if any of them
would regenerate the file:

    fakeroot make -n -f debian/rules.gen binary-arch_amd64_none_amd64
    make  -f debian/rules.gen build-arch_amd64_none_amd64
    make  -f debian/rules.gen build-arch_amd64
    make  -f debian/rules build-arch
    make  -f debian/rules build

Then finally I did this and then it was rebuilt - correctly with my
changes (which I verified with strings command on the binary):
     make  -f debian/rules clean

Now this works....
     make  -f debian/rules.gen build-arch_amd64_none_amd64

Surely no one can work under these painful conditions - being forced
to rebuild all the code from scratch for the kernel to test a change?

Could some one point me to a way or documentation to easily - rebuild
(rather the clean and rebuild) the kernel for another test?

It takes a long time to build the kernel packages from scratch...

Thanks in advance

Andrew


Reply to: