Re: [RFC] Documentation/kbuild/makefiles.txt

From: Sam Ravnborg (sam@ravnborg.org)
Date: Mon Jan 06 2003 - 14:36:51 EST


On Mon, Jan 06, 2003 at 09:04:14AM -0800, Randy.Dunlap wrote:
>
> Can you add a section about building non-kernel-tree drivers etc.?
> I.e., building from source files that are not resident in the
> kernel tree?
>
> And do you have a section on building in $objtree with
> $srctree != $objtree? I didn't see it. Or is this not the right
> document for that topic?

I plan to write a small kernel compile HOWTO. There I will cover
both usage scenarios.
It is supposed to obsolete commands.txt as of today.

makefiles.txt will cover only how to write Makefiles and what they
can be used to do. I kept chapter two because it was a good
definition of the target group.
But I agree with you that the information you requests are missing.

Btw. my patch to build the kernel in a separate directory is
not yet ready for inclusion. oprofile and xfs causes me trouble,
they refuse to do things in the normal way.
Also the lack of consistency when including files annoy me.
I hope to get some feedback from Kai on this soon.

> | Rules.make compiles all the $(obj-y) files. It then calls
> Where is Rules.make nowadays?

[Above is a left-over from the old document, will be updated].

Rules.make vanished when Kai did the spilt into scripts/Makefile.build,
scripts/Makefile.lib, scripts/Makefile.clean etc.
It started with me submitting a patch that made "make clean" descend
down in all directories. That was way too slow, and Kai made the split
speeding up "make clean" a lot.

The concept is that make is called with:
make -f scripts/Makefile.build obj=path/to/makefile
Then Makefile.build includes $(obj)/Makefile.
Therefore the individual Makefiles no longer need to include any
file, and Rules.make became obsolete.

IIRC this concept was originally described some time ago at
kbuild-devel.

> | arch/$(ARCH)/Makefile.
> Example? arch/i386/Makefile in 2.5.54 doesn't contain "head-y".

I have a pending patch introducing head-y for all architectures.
If it is rejected I will update the text.

> | Append or modify as required pr. architecture.
> per (?)
Abbrevation came form the wrong language ;-)

> | will be displayed with "make KBUILD_VERBOSE=0".
> It would be nice to have a shorthand notation for this, like -s
> means "silent".
I have KBUILD_VERBOSE=0 in my .bashrc, but I see your point.

> HTH.

Helps a lot, thanks indeed!
All corrections applied.

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



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:32 EST