From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: "open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: make mandocs questions
Date: Fri, 26 Sep 2025 13:18:58 +0200 [thread overview]
Message-ID: <20250926131858.24de6de1@foz.lan> (raw)
In-Reply-To: <6ac6a844-8394-41fb-9cfc-c44e83268422@infradead.org>
Em Thu, 25 Sep 2025 11:37:24 -0700
Randy Dunlap <rdunlap@infradead.org> escreveu:
> Hi Mauro,
>
> I'm happy to see that you added mandocs as a docs build target.
>
> Would it make sense to place the man output files into various
> subdirectories?
I'm not sure if manpages supports reading man(9) pages from
different drectories, but see more below.
> On linux-next-20250925, I have 76402 files in
> the man/ subdirectory. One time 'ls' told me something like
> "command line argument list too long" but I can't reproduce that.
you probably did something like:
$ ls Documentation/output/man/*.9
bash: /usr/bin/ls: Argument list too long
> Is the output produced just by scanning the entire kernel
> directory structure? That may be too much subdirectory structure
> for the man output.
By default, yes. It runs:
$ ./scripts/kernel-doc . --man
and then splits its output into one man file per man page.
The behavior changes if you set SPHINXDIRS
You can specify just the directories you want with:
$ make SPHINXDIRS="core-api driver-api" mandocs
$ tree -d Documentation/output/
Documentation/output/
├── core-api
│ └── man
└── driver-api
└── man
$ for i in Documentation/output/*; do echo -n "$i: "; ls $i/man|wc -l; done
Documentation/output/core-api: 2464
Documentation/output/driver-api: 6875
On such case, the algorithm changes: it will produce man pages
using only the files that are inside a .. kernel-doc markup from
Documentation, and using SPHINXDIRS normal behavior, each book
will be on its own directory, which is somewhat similar to what
you wanted.
Yet, notice that if you make SPHINXDIRS=<alldirs>, the output
will contain less man pages, as it won't include "orphaned"
descriptions(*).
(*) e.g. files with kernel-doc markups that aren't mentioned by any
Documentation/* rest file.
> Or would it make sense to include the source file path in each
> man page? E.g., if I am looking at fsl_asrc_sel_proc.9,
> include something like "[from sound/soc/fsl/fsl_asrc.c]"
> at the top or the bottom of the man page?
It shouldn't be hard to add it. See a quickhack patch example below.
> Can we get more meaningful output info for warnings like these?
>
> Warning: 385
> Warning: 389
I'm not getting those here on docs tree. will try later to check
with linux-next.
>
> I see 9 warnings like these.
>
> Thanks.
Thanks,
Mauro
next prev parent reply other threads:[~2025-09-26 11:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 18:37 make mandocs questions Randy Dunlap
2025-09-26 11:18 ` Mauro Carvalho Chehab [this message]
2025-09-26 11:32 ` Mauro Carvalho Chehab
2025-09-26 20:08 ` Randy Dunlap
2025-09-26 16:00 ` 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=20250926131858.24de6de1@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rdunlap@infradead.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