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
Unified · Split
| @@ -278,6 +278,13 @@ To get all available archs you can also specify all. E.g.:: · 277 unmodified lines | |||
| 278 | 278 | ||
| 279 | $ make ALLSOURCE_ARCHS=all tags | 279 | $ make ALLSOURCE_ARCHS=all tags |
| 280 | 280 | ||
| 281 | IGNORE_DIRS | ||
| 282 | ----------- | ||
| 283 | For tags/TAGS/cscope targets, you can choose which directories won't | ||
| 284 | be included in the databases, separated by blank space. E.g.:: | ||
| 285 | |||
| 286 | $ make IGNORE_DIRS="drivers/gpu/drm/radeon tools" cscope | ||
| 287 | |||
| 281 | KBUILD_BUILD_TIMESTAMP | 288 | KBUILD_BUILD_TIMESTAMP |
| 282 | ---------------------- | 289 | ---------------------- |
| 283 | Setting this to a date string overrides the timestamp used in the | 290 | Setting this to a date string overrides the timestamp used in the |
| @@ -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 files | 17 | # tags and cscope files should also ignore MODVERSION *.mod.c files |
| 18 | ignore="$ignore ( -name *.mod.c ) -prune -o" | 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 | # 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= build | 28 | # to force full paths for a non-O= build |
| 22 | if [ "${srctree}" = "." -o -z "${srctree}" ]; then | 29 | if [ "${srctree}" = "." -o -z "${srctree}" ]; then |