lkml.org 
[lkml]   [2006]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] duplicate #include check for build system
On Tue, 21 Feb 2006, Herbert Poetzl wrote:

> Hi Sam! Folks!
>
> recently had the idea to utilize cpp or sparse to
> do some automated #include checking, and I came up
> with the following proof of concept:
>
> I just replaced the sparse binary by the following
> script (basically hijacking the make C=1 system)
>
> it would allow kernel developers to easily identify
> duplicate includes, which in turn, might reduce
> dependancies and thus build time ...

I think the kernel style is to encourage duplicate includes, rather than
removing them. Removing duplicate includes won't remove any dependancies
(since the includes that they duplicate will remain). And it makes it
harder to remove unnecessary includes (which does reduce dependancies),
because when header A stops needing header B, various other code could
expect that including header A means they get header B, and these places
have to be found and the formerly-duplicate include put back. So you
actually do best to have lots of duplicate includes and aggressively prune
unnecessary includes.

-Daniel
*This .sig left intentionally blank*
-
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/

\
 
 \ /
  Last update: 2006-02-21 08:32    [W:1.257 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site