Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v2] scripts/tags.sh: fix "make COMPILED_SOURCE=1 cscope" command ends up with *.rlib, *.rmeta, *.so filenames in cscope.files
@ 2026-05-30  8:58 Sergei Litvin
  2026-05-30 10:17 ` Miguel Ojeda
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Litvin @ 2026-05-30  8:58 UTC (permalink / raw)
  To: rust-for-linux; +Cc: linux-kernel, ojeda, Sergei Litvin

When executing the command `make COMPILED_SOURCE=1 cscope`, the `cscope.files`
file generated by it includes filenames with the extensions *.rlib, *.rmeta,
and *.so (taken from *.cmd files, which, in turn, are generated from *.d
dependency files by the `fixdep` utility).

Signed-off-by: Sergei Litvin <litvindev@gmail.com>
---
 scripts/tags.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 243373683f98..9a58fed694b7 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -84,15 +84,20 @@ find_other_sources()
 all_sources()
 {
 	find_arch_include_sources ${SRCARCH} '*.[chS]'
+	find_arch_include_sources ${SRCARCH} '*.rs'
 	if [ -n "$archinclude" ]; then
 		find_arch_include_sources $archinclude '*.[chS]'
+		find_arch_include_sources $archinclude '*.rs'
 	fi
 	find_include_sources '*.[chS]'
+	find_include_sources '*.rs'
 	for arch in $ALLSOURCE_ARCHS
 	do
 		find_arch_sources $arch '*.[chS]'
+		find_arch_sources $arch '*.rs'
 	done
 	find_other_sources '*.[chS]'
+	find_other_sources '*.rs'
 }
 
 all_compiled_sources()
@@ -100,7 +105,7 @@ all_compiled_sources()
 	{
 		echo include/generated/autoconf.h
 		find $ignore -name "*.cmd" -exec \
-			grep -Poh '(?<=^  )\S+|(?<== )\S+[^\\](?=$)' {} \+ |
+			grep -Poh '(?<=^  )\S+\.([chS]|rs)|(?<== )\S+\.(?1)(?=$)' {} \+ |
 		awk '!a[$0]++'
 	} | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) |
 	sort -u
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-01 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-30  8:58 [PATCH v2] scripts/tags.sh: fix "make COMPILED_SOURCE=1 cscope" command ends up with *.rlib, *.rmeta, *.so filenames in cscope.files Sergei Litvin
2026-05-30 10:17 ` Miguel Ojeda
2026-06-01 21:18   ` [PATCH v3] " Sergei Litvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox