开发者

Running ctags for an external kernel module ( or pulling in tags from a separate related project )

I'm building a an 'external' module ( devic开发者_运维百科e driver ), i.e. it's not in the Linux kernel source tree, but in a separate unrelated source tree.

I want to use ctags to browse variable / function declarations and definitions that are being pulled in from the kernel via header files.

For example assuming I have:

~/src/kernel-source
~/src/my_external_module

and I've run make tags for the kernel then how can I run ctags against my module so that it will pick up the tags from what is effectively a separate project in a different directory tree, in this case the Linux kernel source?


If you care about tags files, you must be using them in an editor that uses them, such as vi. Instead of trying to combine tags files, how about telling vi about the additional tags file? Try adding the additional tags file to the 'tags' option:

 :set tags=./tags,tags,/home/myhome/Work/linux-2.6.31/tags,/home/myhome/Work/driver/tags

This sets up a tags search path in vi. See :help tags for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜