On Tue, 4 Jun 2002 22:25:20 -0400 (EDT), 
John Cowan <[EMAIL PROTECTED]> wrote:
>Keith Owens scripsit:
>
>> In order to do separate source and object correctly, kbuild 2.5
>> enforces the rule that #include "" comes from the local directory,
>> #include <> comes from the include path.  include/linux/zlib.h
>> incorrectly does #include "zconf.h" instead of #include <linux/zconf.h>,
>> breaking the rules.
>
>This is not the standard gcc behavior, however; quoted-includes
>can come from the include path, although the current directory
>is searched first.  The purpose of <>-includes is to suppress
>searching the current directory.

What gcc allows and what the kernel uses as a coding style are two
different things.  Almost all of the kernel uses <> for global files
and "" for local files, this is the only sane way of coding for a large
project.  However there are some exceptions where the wrong form has
been used.

The wrong form causes problems for separate source and object
directories.  It also causes problems when you do not compile in the
same directory that does not contain the source, i.e. when you do a
global make instead of recursive make.  kbuild 2.5 has identified all
of the problem includes.  I avoided changing the source, instead I
added extra include paths as a temporary workaround, with FIXME
comments for later clean up.  I noticed that some people have already
used the kbuild 2.5 FIXME comments to clean up their code.


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to