Development Tip

Cscope, Ctags 를 원하는 file만.

Lots2Talk 2012. 2. 23. 15:20

대형 project일 경우, 모두 다 보는 것도 아니고 원하는 file만 등록하여 tagging 을 하는 것이 더 좋을 수도 있다. (ctags와 cscope을 하는데 시간도 많이 걸리고..)

원하는 file을 cscope.files 로 만든 다음, 
$ find <path> <type or name> -print > cscope.files
$ ctags -L cscope.files
$ cscope -I cscope.files

example)
$ find ./abc -name "*.[chS]" -print > cscope.files
$ find ./cdb -name "*.[chS]" -print >> cscope.files #추가할 경우
$ ctags -L cscope.files
$ cscope -I cscope.files

위와 같이 하면, 원하는 file만 등록하여 trace 할 수 있다.