File: build-cscope-index.sh

package info (click to toggle)
wlmaker 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,696 kB
  • sloc: ansic: 58,587; xml: 1,424; python: 1,400; cpp: 253; yacc: 118; sh: 73; lex: 70; makefile: 8
file content (23 lines) | stat: -rwxr-xr-x 540 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh
# Generates Cscope index for wlmaker and all dependencies.

set -o errexit

SUBPATHS="\
dependencies \
include \
src \
submodules"

base_path="$(readlink -f "$(dirname "${0}")")"
rm -f "${base_path}/cscope.files"

for p in ${SUBPATHS} ; do
    echo "Processing ${base_path}/${p} ..."
    find "${base_path}/${p}" -name "*.h" -o -name "*.c" -o -name "*.cpp" | xargs etags
    find "${base_path}/${p}"  -name "*.h" -o -name "*.c" -o -name "*.cpp"  >> cscope.files
done

cscope -Rbkq -i cscope.files 2>/dev/null
echo "Done."
exit 0