Skip to contentSkip to conversation

docs: Makefile: Sort Documentation targets case-insensitively in make help

PATCH Applied Bhanu Seshu Kumar Valluri 2 participants 2 messages Nov 4, 2025 – Nov 5, 2025 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 docs: Makefile: Sort Documentation targets case-insensitively in make help

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'")

---
V1-V2 changes
- Rebased on to commit 27600b51fbc8 ("MAINTAINERS: extend DOCUMENTATION SCRIPTS to the full directories") in docs-next.
- Link to V1: https://lore.kernel.org/lkml/[email protected]/

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +1 -1
index 734ec9c9a..d514ab676 100644
@@ -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:'
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 11 lines · Bhanu Seshu Kumar Valluri

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'")
Quoted 5 lines

---
V1-V2 changes
- Rebased on to commit 27600b51fbc8 ("MAINTAINERS: extend DOCUMENTATION SCRIPTS to the full directories") in docs-next.
- Link to V1: https://lore.kernel.org/lkml/[email protected]/

Applied, thanks.

jon