The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Sergei Litvin <litvindev@gmail.com>
Cc: miguel.ojeda.sandonis@gmail.com, nathan@kernel.org,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org, ojeda@kernel.org
Subject: Re: [PATCH v4] scripts/tags.sh: fix "make COMPILED_SOURCE=1 cscope" command ends up with *.rlib, *.rmeta, *.so filenames in cscope.files
Date: Wed, 1 Jul 2026 21:01:54 +0200	[thread overview]
Message-ID: <akVkIrcpNxZrrfii@levanger> (raw)
In-Reply-To: <20260602121521.11650-1-litvindev@gmail.com>

Hi Sergei,

On Tue, Jun 02, 2026 at 02:15:21PM +0200, Sergei Litvin wrote:
> PROBLEM
> 
> (1) 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).
> 
> (2) When executing the command `make cscope`, the `cscope.files` file generated
> by it includes only filenames with the extensions *.h, *.c, *.S and not includes
> filenames with *.rs extensions.
> 
> SOLUTION
> 
> (1) Modify the regular expression in the `all_compiled_sources()` function so
> that only files with the extensions *.h, *.c, *.S, and *.rs are accepted.
> 
> This causes `make COMPILED_SOURCE=1 cscope` command to generate the
> `cscope.files` file that contains only files with the extensions *.h, *.c, *.S,
> and *.rs.
> 
> (2) Modify the functions `find_arch_sources()`, `find_arch_include_sources()`,
> `find_include_sources()`, and `find_other_sources()` so that they can accept an
> unlimited number of filename patterns as parameters for the search. Add the
> `setup_name_pattern()` function to convert these filename pattern parameters
> into a list of parameters that can be passed to the `find` utility via the new
> `pattern` variable.
> 
> This causes `make cscope` command to generate a `cscope.files` file that
> contains *.rs files along with *.h, *.c, *.S
> 
> Signed-off-by: Sergei Litvin <litvindev@gmail.com>
> 
> ---

thanks for the patch, the actual diff looks good to me!  Just two formal
nits:

1. Your patch contains two reasonable fixes that are valuable each by
themselves; in general it's better to have single patches for single
logical changes.  That helps also for the second nit:

2. The subject line is too long:
Documentation/process/submiting-patches.rst recommends 70-75 characters
with regard to workflows and tools; splitting simplifies writing short subjects, e.g.:

  scripts/tags.sh: Prevent binary files appearing in cscope.files
  scripts/tags.sh: Add support for rust source files


Kind regards,
Nicolas

      reply	other threads:[~2026-07-01 19:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2026-06-02 12:15     ` [PATCH v4] " Sergei Litvin
2026-07-01 19:01       ` Nicolas Schier [this message]

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=akVkIrcpNxZrrfii@levanger \
    --to=nsc@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=litvindev@gmail.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=nathan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox