Re: Unification of Makefiles for kernel build?

Andi Kleen (ak@muc.de)
01 Jan 1999 11:37:08 +0100


In article <368C1E8B.1722F125@packetengines.com>,
alan@packetengines.com (Alan Mimms) writes:
> Hello all,
> I have just completed some rather intense GNU Make Makefile wrangling
> and I'm feeling cocky. I believe there is much to be gained and little
> to be lost from transforming the kernel Make infrastructure so that a
> SINGLE invocation of make is done for the entire build instead of
> invoking make for each subdirectory.

This would be great. I always hated the recursive make loop, which forced
me to use -j4 simply to get make do its job faster although there are
often only a few files to be recompiled. If Make had complete information
about all files that would work much faster.

> If it is possible to assume GNU make is the only make we will ever need
> to use to build the kernel, there are LOTs of features that can employed
> to save perhaps 90% of the time to build a kernel after tiny change.

I think that is a good assumption. People trying to build Linux with
non-GNU make deserve to lose @)

> The mechanism I have been employing here in my "day job" allows the
> various bits of the system to retain their own "Makefile" (although
> I have chosen to rename it to "DirMake.inc"), so special make stuff
> associated with a given directory is still in that directory. Each of
> the DirMake.inc files is included by the intergalactic global Makefile
> at the top level. Naming conventions are used to distinguish CFLAGS
> for, e.g., drivers/char from those required for arch/ppc/kernel. I have
> even made a simple way to use additional unique CFLAGS for building each
> separate FILE.

> Is anyone interested in this? If I did it and it didn't suck would you
> gurus of the Linux community be inclined to use it and make it The Way
> To Make The Kernel?

I would be very interested in it (although I'm not sure if I count as a guru..)

It is probably worth to keep the ar archive building set to make sure
that no unnecessary code is linked in.

Of course it is currently too late for 2.2, but I think it would be a very
useful addition early in the 2.3 cycle.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/