|
|

楼主 |
发表于 2009-5-20 23:34:37
|
显示全部楼层
多谢, 我现在弄成绝对路戏就有搞头了
- #!/bin/bash
- #find . -name "*.[chsS]" -print > cscope.files
- #--------------------------------------------------------------------------------------------
- #find . -name "*.h" -o -name "*.c" -o -name "*.cc" -o -iname "*.cpp" > cscope.files
- #find `pwd` -name "*.h" -o -name "*.c" -o -name "*.cc" -o -iname "*.cpp" > cscope.files
- PWD_DIR=`pwd`
- find ${PWD_DIR} -name "*.[chsS]" -print > cscope.files
- TMPDIR=/var/tmp cscope -bkq -i cscope.files
- #ctags -R
- TMPDIR=/var/tmp ctags -R --c++-kinds=+p --fields=+iaS --extra=+q `pwd`
- #--------------------------------------------------------------------------------------------
- # 0 或 s: 查找本 C 符号 查找C语言符号,即查找函数名、宏、枚举值等出现的地方
- # 1 或 g: 查找本定义 查找函数、宏、枚举等定义的位置,类似ctags所提供的功能
- # 2 或 d: 查找本函数调用的函数
- # 3 或 c: 查找调用本函数的函数
- # 4 或 t: 查找本字符串
- # 6 或 e: 查找本 egrep 模式 相当于egrep功能,但查找速度快多了
- # 7 或 f: 查找本文件 查找并打开文件,类似vim的find功能
- # 8 或 i: 查找包含本文件的文件
- #
- #--------------------------------------------------------------------------------------------
复制代码- -rw-r--r-- 1 root root 1.5M 05-20 23:24 cscope.files
- -rw-r--r-- 1 root root 9.2M 05-16 12:02 vmlinux.o
- -rwxr-xr-x 1 root root 11M 05-16 12:02 vmlinux
- -rw-r--r-- 1 root root 27M 05-20 23:27 cscope.in.out
- -rw-r--r-- 1 root root 152M 05-20 23:27 cscope.po.out
- -rw-r--r-- 1 root root 209M 05-16 15:42 tags
- -rw-r--r-- 1 root root 220M 05-20 23:27 cscope.out
复制代码
用绝对路径来索引的,一直没试过相对路径正常的,也许跟 vimrc 有关吧 |
|