From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Stephen Rothwell" <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 1/6] scripts/get_feat.pl: allow output the parsed file names
Date: Sat, 26 Mar 2022 11:27:19 +0100 [thread overview]
Message-ID: <11b438ee01e00c866f5ea197d6aecc26e9f86945.1648290305.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1648290305.git.mchehab@kernel.org>
Such output could be helpful while debugging it, but its main
goal is to tell kernel_feat.py about what files were used
by the script. Thie way, kernel_feat.py can add those as
documentation dependencies.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mchehab@kernel.org/
scripts/get_feat.pl | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/scripts/get_feat.pl b/scripts/get_feat.pl
index 457712355676..76cfb96b59b6 100755
--- a/scripts/get_feat.pl
+++ b/scripts/get_feat.pl
@@ -13,6 +13,7 @@ my $man;
my $debug;
my $arch;
my $feat;
+my $enable_fname;
my $basename = abs_path($0);
$basename =~ s,/[^/]+$,/,;
@@ -31,6 +32,7 @@ GetOptions(
'arch=s' => \$arch,
'feat=s' => \$feat,
'feature=s' => \$feat,
+ "enable-fname" => \$enable_fname,
man => \$man
) or pod2usage(2);
@@ -95,6 +97,10 @@ sub parse_feat {
return if ($file =~ m,($prefix)/arch-support.txt,);
return if (!($file =~ m,arch-support.txt$,));
+ if ($enable_fname) {
+ printf ".. FILE %s\n", abs_path($file);
+ }
+
my $subsys = "";
$subsys = $2 if ( m,.*($prefix)/([^/]+).*,);
@@ -580,6 +586,11 @@ Output features for a single specific feature.
Changes the location of the Feature files. By default, it uses
the Documentation/features directory.
+=item B<--enable-fname>
+
+Prints the file name of the feature files. This can be used in order to
+track dependencies during documentation build.
+
=item B<--debug>
Put the script in verbose mode, useful for debugging. Can be called multiple
--
2.35.1
next prev parent reply other threads:[~2022-03-26 10:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-26 10:27 [PATCH v3 0/6] Better handle dependencies on Sphinx extensions Mauro Carvalho Chehab
2022-03-26 10:27 ` Mauro Carvalho Chehab [this message]
2022-03-26 10:27 ` [PATCH v3 2/6] docs: kernel_feat.py: add build dependencies Mauro Carvalho Chehab
2022-03-26 10:27 ` [PATCH v3 3/6] docs: kernel_abi.py: add sphinx " Mauro Carvalho Chehab
2022-03-26 10:27 ` [PATCH v3 4/6] docs: kernel_include.py: " Mauro Carvalho Chehab
2022-03-26 10:27 ` [PATCH v3 5/6] scripts/get_abi: change the file/line number meta info Mauro Carvalho Chehab
2022-03-26 10:27 ` [PATCH v3 6/6] scripts/kernel-doc: change the line " Mauro Carvalho Chehab
2022-03-28 20:00 ` [PATCH v3 0/6] Better handle dependencies on Sphinx extensions Jonathan Corbet
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=11b438ee01e00c866f5ea197d6aecc26e9f86945.1648290305.git.mchehab@kernel.org \
--to=mchehab@kernel.org \
--cc=corbet@lwn.net \
--cc=hdegoede@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).