]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: Makefile: Sort Documentation targets case-insensitively in make help
authorBhanu Seshu Kumar Valluri <bhanuseshukumar@gmail.com>
Tue, 4 Nov 2025 06:17:23 +0000 (11:47 +0530)
committerJonathan Corbet <corbet@lwn.net>
Wed, 5 Nov 2025 18:26:24 +0000 (11:26 -0700)
Avoid case-sensitive sorting when listing Documentation targets in make help.
Previously, targets like PCI and RCU appeared ahead of others due to uppercase
names.

Normalize casing during _SPHINXDIRS generation to ensure consistent and
intuitive ordering.

Fixes: 965fc39f7393 ("Documentation: sort _SPHINXDIRS for 'make help'")
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Bhanu Seshu Kumar Valluri <bhanuseshukumar@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104061723.16629-1-bhanuseshukumar@gmail.com>

Documentation/Makefile

index 734ec9c9a62c8a11aac2909c5d0b2ee4348a43fa..d514ab6761dca12ec29e0b5e72cc29e16d010b77 100644 (file)
@@ -84,7 +84,7 @@ cleandocs:
        $(Q)rm -rf $(BUILDDIR)
 
 # Used only on help
-_SPHINXDIRS   = $(sort $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)))
+_SPHINXDIRS   = $(shell printf "%s\n" $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)) | sort -f)
 
 dochelp:
        @echo  ' Linux kernel internal documentation in different formats from ReST:'