From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Hans de Goede <hdegoede@redhat.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] scripts/get_feat.pl: allow output the parsed file names
Date: Sat, 26 Mar 2022 00:21:09 +0100 [thread overview]
Message-ID: <20220326002109.2cda0402@coco.lan> (raw)
In-Reply-To: <874k3lg7r3.fsf@meer.lwn.net>
Em Fri, 25 Mar 2022 13:19:28 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
>
> > 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>
>
> So I think these are worth getting into 5.18,
Yeah, agreed.
> but I do have one question:
>
> > @@ -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 "#define FILE %s\n", abs_path($file);
> > + }
> > +
>
> Why do you output the file names in this format? This isn't input to
> the C preprocessor, so the #define just seems strange. What am I
> missing here?
Well, I didn't think much about that... I just ended using a way that is
already used on get_abi.pl, and was originally imported from kernel-doc :-)
It could be using whatever other tag, but I would keep those three scripts
using a similar markup string for file names and line numbers:
scripts/get_abi.pl:
printf "#define LINENO %s%s#%s\n\n", $prefix, $file[0], $data{$what}->{line_no};
scripts/kernel-doc:
print "#define LINENO " . $lineno . "\n";
Thanks,
Mauro
next prev parent reply other threads:[~2022-03-25 23:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 14:05 [PATCH v2 0/4] Better handle dependencies on Sphinx extensions Mauro Carvalho Chehab
2022-03-25 14:05 ` [PATCH v2 1/4] scripts/get_feat.pl: allow output the parsed file names Mauro Carvalho Chehab
2022-03-25 19:19 ` Jonathan Corbet
2022-03-25 23:21 ` Mauro Carvalho Chehab [this message]
2022-03-25 23:30 ` Mauro Carvalho Chehab
2022-03-26 0:02 ` Jonathan Corbet
2022-03-26 10:24 ` Mauro Carvalho Chehab
2022-03-25 14:05 ` [PATCH v2 2/4] docs: kernel_abi.py: add sphinx build dependencies Mauro Carvalho Chehab
2022-03-25 14:05 ` [PATCH v2 3/4] docs: kernel_feat.py: add " Mauro Carvalho Chehab
2022-03-25 14:05 ` [PATCH v2 4/4] docs: kernel_include.py: add sphinx " Mauro Carvalho Chehab
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=20220326002109.2cda0402@coco.lan \
--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).