日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

公布生成cscope.out, cscope.files, tags的脚本文件

發布時間:2023/12/9 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 公布生成cscope.out, cscope.files, tags的脚本文件 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

通過VIM搭建一個IDE,網上的文章有很多,這里就不獻丑了。

下面記錄下生成tags,cscope.out, cscope.files的腳本文件

一、windows版本(.bat)

del cscope.out cscope.files tags echo del "cscope.out cscope.files tags" successful!echo "ctags create" ctags --languages=c --langmap=c:+.h --extra=+q -Recho "cscope create" dir /s /b *.c *.h > cscope.files cscope -bCkR -i cscope.files

注意:

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的脚本文件的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。