本文共 1366 字,大约阅读时间需要 4 分钟。
#!/bin/bashUBOOT=$PWD#generate the cscope.files find $UBOOT \ -path "$UBOOT/include/configs*" -prune -o \ -path "$UBOOT/board/*" -prune -o \ -path "$UBOOT/drivers/serial/*" -prune -o \ -path "$UBOOT/nand_spl/*" -prune -o \ -path "$UBOOT/onenand_ipl/*" -prune -o \ -path "$UBOOT/doc/*" -prune -o \ -path "$UBOOT/arch/arm/cpu/*" -prune -o \ -path "$UBOOT/arch/arm/include/asm/*" ! -path "$UBOOT/arch/arm/include/asm/arch-s3c24x0*" -prune -o \ -path "$UBOOT/arch/*" ! -path "$UBOOT/arch/arm*" -prune -o \ -path "$UBOOT/examples/*" -prune -o \ -path "$UBOOT/tools/*" -prune -o \ -name "*.[chsS]" -print > $UBOOT/cscope.filesfind $UBOOT/include/configs/ -name mini2440.h >> $UBOOT/cscope.files find $UBOOT/board/samsung/mini2440/ -name "*.[chsS]" >> $UBOOT/cscope.files find $UBOOT/drivers/serial/ -name serial_s3c24x0.c >> $UBOOT/cscope.files find $UBOOT/arch/arm/cpu/arm920t/s3c24x0/ -name "*.[chsS]" >> $UBOOT/cscope.files cscope -bkq -i $UBOOT/cscope.files#generate the cppcomplete ctags -n -f tags --fields=+ai --C++-types=+p * -L $UBOOT/cscope.files#Try setting the $CSCOPE_DB environment variable to point to a Cscope database you create, so you won't always need to launch Vim in the same directory as the database.#export CSCOPE_DB export CSCOPE_DB=$UBOOT/cscope.out
转载地址:http://epuhj.baihongyu.com/