lkml.org 
[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tags: include headers before source files
On 3.2.2010 17:25, Guennadi Liakhovetski wrote:
> Currently looking up a structure definition in TAGS / tags takes one to
> one of multiple "static struct X" definitions in arch sources, which makes
> it for many structs practically impossible to get to the required header.
> This patch changes the order of sources being tagged to first scan
> architecture includes, then the top-level include/ directory, and only
> then the rest. It also takes into account, that many architectures have
> more than one include directory, i.e., not only arch/$ARCH/include, but
> also arch/$ARCH/mach-X/include etc.

Hi Guennadi

This is a cool idea, but there is one issue:


> # find sources in arch/$1/include
> find_arch_include_sources()
> {
> - find ${tree}arch/$1/include $ignore -name "$2" -print;
> + include=$(find ${tree}arch/$1/ -name include -type d);
> + archincludedir+=$include
> + find $include $ignore -name "$2" -print;

You need to check if $include isn't empty, which it is on i386 or x86_64
(and on other archs where $ARCH != $SRCARCH). If I do a 'make cscope'
after your change, the second find statement crawls the whole filesystem.

Michal



\
 
 \ /
  Last update: 2010-02-05 23:01    [W:0.148 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site