History

scripts/tags.sh: choose which directories to exclude from being indexed

It's common for drivers that share same physical components to also duplicate source code (or at least portions of it). A good example is both drivers/gpu/drm/amdgpu/* and drivers/gpu/drm/radeon/* have a header file called atombios.h. While their contents aren't the same, a lot of their structs have the exact same names which makes navigating through the code base a bit messy as cscope will show up 'references' across drivers which aren't exactly correct. Add IGNORE_DIRS variable, which specifies which directories to be ignored from indexing. Example: make ARCH=x86 IGNORE_DIRS="drivers/gpu/drm/radeon tools" cscope

Paulo Miguel Almeida committed 3 years ago

Commit 40bf2fc1 parent d717a3a2 files · +14 −0Browse files

Showing the changes to scripts (1 of 2 files). Show all

Unified · Split

scripts/tags.sh+7−0
@@ -17,6 +17,13 @@ ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )" · 16 unmodified lines
17# tags and cscope files should also ignore MODVERSION *.mod.c files17# tags and cscope files should also ignore MODVERSION *.mod.c files
18ignore="$ignore ( -name *.mod.c ) -prune -o"18ignore="$ignore ( -name *.mod.c ) -prune -o"
19 19
20# ignore arbitrary directories
21if [ -n "${IGNORE_DIRS}" ]; then
22 for i in ${IGNORE_DIRS}; do
23 ignore="${ignore} ( -path $i ) -prune -o"
24 done
25fi
26
20# Use make KBUILD_ABS_SRCTREE=1 {tags|cscope}27# Use make KBUILD_ABS_SRCTREE=1 {tags|cscope}
21# to force full paths for a non-O= build28# to force full paths for a non-O= build
22if [ "${srctree}" = "." -o -z "${srctree}" ]; then29if [ "${srctree}" = "." -o -z "${srctree}" ]; then

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t