Distribution: Any 2.6-based distribution Hardware Environment: N/A Software Environment: N/A Problem Description: The 2.6 kernel uses the new "kbuild" mechanism for building. kbuild is really nothing more than a fancy master Makefile that sets up a bunch of stuff, parses the local makefile, and then does a build. The problem is that if I have a module that's compile outside the kernel (and this might also happen to internal modules), it's the master makefile that interprets the targets, not the local makefile. This is because the make command is issued with the -C parameter, which means all targets are passed to the master makefile first. Steps to reproduce: 1) Create a driver and a makefile in a directory outside of /usr/src/linux (for example). 2) In the directory for your driver, issue the command "make -C /usr/src/linux SUBDIRS=$PWD clean" 3) Watch in horror as your /usr/src/linux tree gets cleaned out.
Timur, is this still the case with recent kernel? Thanks.
I have tried to reproduce it in the past with no success. But if the commanline conain mistakes suchs as: make -C /user/src/linux SUBDIRSS=`pwd` The we will see the behaviour Timur describers. Likewise if the assignment is empty like in make -C /user/src/linux SUBDIRS=`pwdd` Timur - any chance this was what hit you. With the external module I have around the bug is not reproduceable. If you still see this bug then please send me the output of "make V=1 -C ...." And a copy of your Makefile. Sam
Wow, I've completely forgotten about this bug. Unfortunately, I'm on vacation this week so I won't be able to try it out, but I'll try it next week and let you guys know.
Hi Timur. Any news on this?
This bug is so old, that I don't do this kind of work any more. If you can't reproduce it, then just close it.
Closed as it cannot be reproduced. Original submitter does not do this kind of work anymore, and I have tried to reproduce with various setups without success. As I asusme it is fixed some time ago resolution was set to "CODE_FIX". /Sam