]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/docs: sphinx-build-wrapper: Fix output for duplicated names
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 18 Sep 2025 11:54:52 +0000 (13:54 +0200)
committerJonathan Corbet <corbet@lwn.net>
Thu, 18 Sep 2025 17:18:39 +0000 (11:18 -0600)
commit0d9abc7627f5aeaaa8db6e856d800819cc9d85b1
treeff29af42402d02a13415a427b3db9d9727203c68
parent82c294d453c0f065133da064f92a121500cc5643
tools/docs: sphinx-build-wrapper: Fix output for duplicated names

When SPHINXDIRS is used, basename may be identical for different
files. If this happens, the summary and error detection won't be
accurate.

Fix it by using relative names from builddir.

While here, don't duplicate names. Report, instead:

- SUCCESS
    output PDF file was built
- FAILED
    latexmk/xelatex didn't build any PDF output
- FAILED: no .tex files were generated
    Sphinx didn't build any tex file for SPHINXDIRS directories
- FAILED ({python exception})
    When a concurrent.futures is catched. Usually indicates an
    internal error at the build logic.

With that, building multiple dirs with the same name is reported
properly:

    $ make V=1 SPHINXDIRS="admin-guide/media driver-api/media userspace-api/media" pdfdocs

    Summary
    =======
    admin-guide/media/pdf/media.pdf  : SUCCESS
    driver-api/media/pdf/media.pdf   : SUCCESS
    userspace-api/media/pdf/media.pdf: SUCCESS

And if at least one of them fails, return code will be 1.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <d4a4f16f6c0c423ad38531a490888be3bf01e574.1758196090.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
tools/docs/sphinx-build-wrapper