Skip to content

Commit 162343a

Browse files
rustylifegregkh
authored andcommitted
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: 4f491bb ("scripts/tags.sh: collect compiled source precisely") Link: https://lore.kernel.org/lkml/20200809210056.GA1344537@thinkpad Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com> Link: https://lore.kernel.org/r/20200810153650.1822316-1-rkovhaev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bd018a6 commit 162343a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/tags.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ else
2626
fi
2727

2828
# ignore userspace tools
29-
ignore="$ignore ( -path ${tree}tools ) -prune -o"
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
3034

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

0 commit comments

Comments
 (0)