Commit 162343a8 authored by Rustam Kovhaev's avatar Rustam Kovhaev Committed by Greg Kroah-Hartman
Browse files

scripts/tags.sh: exclude tools directory from tags generation

when COMPILED_SOURCE is set, running 'make ARCH=x86_64 COMPILED_SOURCE=1
cscope tags' in KBUILD_OUTPUT directory produces lots of "No such file
or directory" warnings:
...
realpath: sigchain.h: No such file or directory
realpath: orc_gen.c: No such file or directory
realpath: objtool.c: No such file or directory
...
let's exclude tools directory from tags generation

Fixes: 4f491bb6 ("scripts/tags.sh: collect compiled source precisely")
Link: https://lore.kernel.org/lkml/20200809210056.GA1344537@thinkpad


Signed-off-by: default avatarRustam Kovhaev <rkovhaev@gmail.com>
Link: https://lore.kernel.org/r/20200810153650.1822316-1-rkovhaev@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bd018a6a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -26,7 +26,11 @@ else
fi

# ignore userspace tools
if [ -n "$COMPILED_SOURCE" ]; then
	ignore="$ignore ( -path ./tools ) -prune -o"
else
	ignore="$ignore ( -path ${tree}tools ) -prune -o"
fi

# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
if [ "${ALLSOURCE_ARCHS}" = "" ]; then
@@ -92,7 +96,7 @@ all_sources()
all_compiled_sources()
{
	realpath -es $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) \
		include/generated/autoconf.h $(find -name "*.cmd" -exec \
		include/generated/autoconf.h $(find $ignore -name "*.cmd" -exec \
		grep -Poh '(?(?=^source_.* \K).*|(?=^  \K\S).*(?= \\))' {} \+ |
		awk '!a[$0]++') | sort -u
}