diff options
author | Jialu Xu <[email protected]> | 2020-08-06 23:17:29 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-08-07 11:33:21 -0700 |
commit | 4f491bb6ea2aef2f5b184f385904a73796d98554 (patch) | |
tree | a29e35139ff48e28636b3d02faaa71cb60ff307e | |
parent | d830020656c5b68ced962ed3cb51a90e0a89d4c4 (diff) |
scripts/tags.sh: collect compiled source precisely
Parse compiled source from *.cmd but don't 'find' too many files that are
not related to compilation.
[[email protected]: don't expand symlinks by add option -s for realpath]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jialu Xu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Joe Perches <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-x | scripts/tags.sh | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh index 4e18ae5282a6..32d3f53af10b 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -91,20 +91,10 @@ all_sources() all_compiled_sources() { - for i in $(all_sources); do - case "$i" in - *.[cS]) - j=${i/\.[cS]/\.o} - j="${j#$tree}" - if [ -e $j ]; then - echo $i - fi - ;; - *) - echo $i - ;; - esac - done + realpath -es $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) \ + include/generated/autoconf.h $(find -name "*.cmd" -exec \ + grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ | + awk '!a[$0]++') | sort -u } all_target_sources() |