Skip to contentSkip to conversation

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

PATCH Superseded Bhanu Seshu Kumar Valluri 3 participants 4 messages Oct 15, 2025 – Oct 29, 2025 Documentation

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

---
Notes
- Patch is tested with make help command.
- Verified case-insensitive sorting.

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +1 -1
index 3609cb86137b..00c81e7947a9 100644
@@ -23,7 +23,7 @@ SPHINXOPTS    =
 SPHINXDIRS    = .
 DOCS_THEME    =
 DOCS_CSS      =
-_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)
 SPHINX_CONF   = conf.py
 PAPER         =
 BUILDDIR      = $(obj)/output
Signature · 1 line
2.34.1
#1 lore raw
Quoted 22 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'")

---
Notes
- Patch is tested with make help command.
- Verified case-insensitive sorting.

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +0 -0
index 3609cb86137b..00c81e7947a9 100644

Documentation/Makefile SPHINXOPTS = · line 29

Quoted 8 lines
Documentation/Makefile +1 -1
@@ -23,7 +23,7 @@ SPHINXOPTS    =
 SPHINXDIRS    = .
 DOCS_THEME    =
 DOCS_CSS      =
-_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)
 SPHINX_CONF   = conf.py
 PAPER         =
 BUILDDIR      = $(obj)/output

Hi,

I just wanted to check if you had a chance to review the patch or if any changes are needed from my side.

Regards,
Bhanu Seshu Kumar Valluri

reviewer Tested-by Acked-by
#2 lore raw
Quoted 33 lines · Bhanu Seshu Kumar Valluri
Quoted 22 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'")

---
Notes
- Patch is tested with make help command.
- Verified case-insensitive sorting.

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +0 -0
index 3609cb86137b..00c81e7947a9 100644

Documentation/Makefile SPHINXOPTS = · line 29

Quoted 8 lines
Documentation/Makefile +1 -1
@@ -23,7 +23,7 @@ SPHINXOPTS    =
 SPHINXDIRS    = .
 DOCS_THEME    =
 DOCS_CSS      =
-_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)
 SPHINX_CONF   = conf.py
 PAPER         =
 BUILDDIR      = $(obj)/output

Hi,

Quoted 1 line

I just wanted to check if you had a chance to review the patch or if any changes are needed from my side.

It's OK with me and it works.

Signature · 1 line
~Randy
maintainer
#3 lore raw
In reply to Bhanu Seshu Kumar Valluri
Quoted 22 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'")

---
Notes
- Patch is tested with make help command.
- Verified case-insensitive sorting.

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/Makefile +0 -0
index 3609cb86137b..00c81e7947a9 100644

Documentation/Makefile SPHINXOPTS = · line 29

Quoted 8 lines
Documentation/Makefile +1 -1
@@ -23,7 +23,7 @@ SPHINXOPTS    =
 SPHINXDIRS    = .
 DOCS_THEME    =
 DOCS_CSS      =
-_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)
 SPHINX_CONF   = conf.py
 PAPER         =
 BUILDDIR      = $(obj)/output

I'm unconvinced that the extra complexity is really needed ... but I went to apply it anyway. Unfortunately, this patch doesn't apply to docs-next.

Thanks,

jon