From: Sergei Litvin <litvindev@gmail.com>
To: rust-for-linux@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, ojeda@kernel.org,
Sergei Litvin <litvindev@gmail.com>
Subject: [PATCH] scripts/tags.sh: fix "make COMPILED_SOURCE=1 cscope" command ends up with *.rlib, *.rmeta, *.so filenames in cscope.files
Date: Sat, 30 May 2026 09:06:31 +0200 [thread overview]
Message-ID: <20260530070631.14955-1-litvindev@gmail.com> (raw)
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 | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 243373683f98..f6642bb0f8ee 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -52,7 +52,7 @@ find_arch_sources()
for i in $archincludedir; do
local prune="$prune ( -path $i ) -prune -o"
done
- find ${tree}arch/$1 $ignore $prune -name "$2" -not -type l -print;
+ find ${tree}arch/$1 $ignore $prune -regextype posix-extended -regex "$2" -not -type l -print;
}
# find sources in arch/$1/include
@@ -61,14 +61,14 @@ find_arch_include_sources()
local include=$(find ${tree}arch/$1/ -name include -type d -print);
if [ -n "$include" ]; then
archincludedir="$archincludedir $include"
- find $include $ignore -name "$2" -not -type l -print;
+ find $include $ignore -regextype posix-extended -regex "$2" -not -type l -print;
fi
}
# find sources in include/
find_include_sources()
{
- find ${tree}include $ignore -name config -prune -o -name "$1" \
+ find ${tree}include $ignore -name config -prune -o -regextype posix-extended -regex "$1" \
-not -type l -print;
}
@@ -78,21 +78,21 @@ find_other_sources()
{
find ${tree}* $ignore \
\( -path ${tree}include -o -path ${tree}arch -o -name '.tmp_*' \) -prune -o \
- -name "$1" -not -type l -print;
+ -regextype posix-extended -regex "$1" -not -type l -print;
}
all_sources()
{
- find_arch_include_sources ${SRCARCH} '*.[chS]'
+ find_arch_include_sources ${SRCARCH} '.*\.([chS]|rs)'
if [ -n "$archinclude" ]; then
- find_arch_include_sources $archinclude '*.[chS]'
+ find_arch_include_sources $archinclude '.*\.([chS]|rs)'
fi
- find_include_sources '*.[chS]'
+ find_include_sources '.*\.([chS]|rs)'
for arch in $ALLSOURCE_ARCHS
do
- find_arch_sources $arch '*.[chS]'
+ find_arch_sources $arch '.*\.([chS]|rs)'
done
- find_other_sources '*.[chS]'
+ find_other_sources '.*\.([chS]|rs)'
}
all_compiled_sources()
@@ -100,7 +100,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
reply other threads:[~2026-05-30 7:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260530070631.14955-1-litvindev@gmail.com \
--to=litvindev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.