Add tools directory in generating tags and quiet the "No such file or directory" warnings. It reverts the changes introduced in commit 162343a876f1 ("scripts/tags.sh: exclude tools directory from tags generation") while maintainig the original intent of the patch to get rid of the warnings. This allows the root level cscope files to include tools source code besides kernel and a single place to browse the code for both.
Unified · Split
| @@ -25,13 +25,6 @@ else · 24 unmodified lines | |||
| 25 | tree=${srctree}/ | 25 | tree=${srctree}/ |
| 26 | fi | 26 | fi |
| 27 | 27 | ||
| 28 | # ignore userspace tools | ||
| 29 | if [ -n "$COMPILED_SOURCE" ]; then | ||
| 30 | ignore="$ignore ( -path ./tools ) -prune -o" | ||
| 31 | else | ||
| 32 | ignore="$ignore ( -path ${tree}tools ) -prune -o" | ||
| 33 | fi | ||
| 34 | |||
| 35 | # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH | 28 | # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH |
| 36 | if [ "${ALLSOURCE_ARCHS}" = "" ]; then | 29 | if [ "${ALLSOURCE_ARCHS}" = "" ]; then |
| 37 | ALLSOURCE_ARCHS=${SRCARCH} | 30 | ALLSOURCE_ARCHS=${SRCARCH} |
| @@ -100,7 +93,7 @@ all_compiled_sources() · 62 unmodified lines | |||
| 100 | find $ignore -name "*.cmd" -exec \ | 93 | find $ignore -name "*.cmd" -exec \ |
| 101 | grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ | | 94 | grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ | |
| 102 | awk '!a[$0]++' | 95 | awk '!a[$0]++' |
| 103 | } | xargs realpath -es $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | | 96 | } | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | |
| 104 | sort -u | 97 | sort -u |
| 105 | } | 98 | } |
| 106 | 99 | ||