公布生成cscope.out, cscope.files, tags的脚本文件
生活随笔
收集整理的這篇文章主要介紹了
公布生成cscope.out, cscope.files, tags的脚本文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
通過VIM搭建一個IDE,網上的文章有很多,這里就不獻丑了。
下面記錄下生成tags,cscope.out, cscope.files的腳本文件
一、windows版本(.bat)
注意:
1. 執行上面的腳本前,請確保正確安裝了ctags.exe和cscope.exe,并配置到了環境變量PATH下。
2. windows下生成的cscope.files中的路徑是絕對路徑
針對lvr的生成腳本:
@echo offgoto start1. 獲取當前路徑2. 得到cscope.files的全路徑3. 刪除原來生成的文件4. 將lib的源文件加入cscope.files5. 將lvr的源文件加入cscope.files6. 利用cscope建立索引數據庫:startset curpath=%cd% set csfile=%curpath%\cscope.filesdel tags cscope.out cscope.files ctags --languages=c --langmap=c:+.h --extra=+q -Rset libpath=%curpath%\..\..\lib_new_gui cd %libpath%\trunk\platform_x2 dir /s /b *.c *.h > %csfile%cd %curpath% dir /s /b *.c *.h >> %csfile%cscope -bCkR -i %csfile% -I%libpath%-----------------------------------------------------------------------------------------------------------------------------
二、Linux版本(.sh)
#!/bin/bash echo "delete cscope.files, cscope.out, tags" rm -f cscope.files cscope.out tagsecho "create cscope.files" find . -name '*.h' -o -name '*.c' > cscope.filesecho "cscope add cscope.files" cscope -bCkR -i cscope.filesecho "create tags" ctags --languages=c --langmap=c:+.h --extra=+q -R注意:
linux下生成的cscope.files中的路徑是相對路徑,由find后的路徑決定,所以一般在vim的配置中不使用"set autochdir"!
總結
以上是生活随笔為你收集整理的公布生成cscope.out, cscope.files, tags的脚本文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 基于51单片机的双机通信系统设计prot
- 下一篇: Samba服务全攻略