On Fri, Mar 02, 2007 at 09:14:22AM -0800, FN wrote:
The build system for the kernel (kbuild) have a number of goals to fulfill.
The most important ones was to be reliable and easy to use.
The easy to use part has mandated a very simple syntax in the
more than 1000 Makefiles in the kernel - and kbuild has been extended
support external modules too.
With the 2.6 kernel it is mandatory to use kbuild for external
modules for a number of reasons:
-> compiler and to some extent linker options now much more rely on
the actual configuration. So a gcc commandline for a module may look
different depending on the actual configuration.
-> The module support code is well integrated with kbuildand when
it changes (and it does so now and then) then all external modules
do not need to apply the same changes.
-> Same syntax for in-kernel and external modules makes it simpler.
The infrastructure used to achieve the goals of simplicity and reliability
rely and a great deal of the features supported by GNU make and that
clearmake and others does not support.
So faced with the two possibilities which is
1) to rely on less GNU make features and support other make tools
2) full feature set but rely on GNU make
the choice was easy.
The point here is that even if kbuild was changed slightly to allow a user
to specify an alternative make program when building external modules
that would not work because kbuild rely too much on the GNU make features.
You can try this today.
MAKE=/usr/bin/my_make_utility make M=`pwd`
And see how it fails due to use of GNU make features.