File: build-cscope-index.sh

package info (click to toggle)
wlmaker 0.6.1%2Bgit20250919%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 12,056 kB
  • sloc: ansic: 144,965; sh: 10,507; xml: 4,163; python: 1,400; makefile: 499; yacc: 119; lex: 70; awk: 12
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