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
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -17,6 +17,13 @@ ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )" · 16 unmodified lines | ||
| 17 | 17 | # tags and cscope files should also ignore MODVERSION *.mod.c files |
| 18 | 18 | ignore="$ignore ( -name *.mod.c ) -prune -o" |
| 19 | 19 | |
| 20 | +# ignore arbitrary directories | |
| 21 | +if [ -n "${IGNORE_DIRS}" ]; then | |
| 22 | + for i in ${IGNORE_DIRS}; do | |
| 23 | + ignore="${ignore} ( -path $i ) -prune -o" | |
| 24 | + done | |
| 25 | +fi | |
| 26 | + | |
| 20 | 27 | # Use make KBUILD_ABS_SRCTREE=1 {tags|cscope} |
| 21 | 28 | # to force full paths for a non-O= build |
| 22 | 29 | if [ "${srctree}" = "." -o -z "${srctree}" ]; then |