mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] docs: Makefile: wrap SPHINXDIRS help text
@ 2025-12-26  8:56 mustafaelrasheid
  2025-12-26 21:37 ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: mustafaelrasheid @ 2025-12-26  8:56 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Jonathan Corbet, linux-doc, linux-kernel, Mustafa Elrasheid

From: Mustafa Elrasheid <mustafaelrasheid@gmail.com>

When using `make help`, SPHINXDIR doesn't wrap around 80 characters,
causing text to overflow or wrap in incorrect ways,
which then makes the text difficult to read

Signed-off-by: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
---
v2:
  - Added '-s' in fmt to prevent word segmenting at the end of lines.
  - Reduced width in `fmt -w` to account for the added indentation of
    `sed`

 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index e96ac6dcac4f..e260df866f5e 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -98,7 +98,7 @@ dochelp:
 	@echo  '  cleandocs       - clean all generated files'
 	@echo
 	@echo  '  make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
-	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)'
+	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)' | fmt -s -w 72 | sed '1!s/^/    /'
 	@echo  '  you may also use a subdirectory like SPHINXDIRS=userspace-api/media,'
 	@echo  '  provided that there is an index.rst file at the subdirectory.'
 	@echo
-- 
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] docs: Makefile: wrap SPHINXDIRS help text
  2025-12-26  8:56 [PATCH v2] docs: Makefile: wrap SPHINXDIRS help text mustafaelrasheid
@ 2025-12-26 21:37 ` Randy Dunlap
  2025-12-27 12:52   ` [PATCH v3] " mustafaelrasheid
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2025-12-26 21:37 UTC (permalink / raw)
  To: mustafaelrasheid; +Cc: Jonathan Corbet, linux-doc, linux-kernel

Hi,

On 12/26/25 12:56 AM, mustafaelrasheid@gmail.com wrote:
> From: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
> 
> When using `make help`, SPHINXDIR doesn't wrap around 80 characters,
> causing text to overflow or wrap in incorrect ways,
> which then makes the text difficult to read
> 
> Signed-off-by: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
> ---
> v2:
>   - Added '-s' in fmt to prevent word segmenting at the end of lines.
>   - Reduced width in `fmt -w` to account for the added indentation of
>     `sed`
> 
>  Documentation/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index e96ac6dcac4f..e260df866f5e 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -98,7 +98,7 @@ dochelp:
>  	@echo  '  cleandocs       - clean all generated files'
>  	@echo
>  	@echo  '  make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
> -	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)'
> +	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)' | fmt -s -w 72 | sed '1!s/^/    /'
>  	@echo  '  you may also use a subdirectory like SPHINXDIRS=userspace-api/media,'
>  	@echo  '  provided that there is an index.rst file at the subdirectory.'
>  	@echo

OK, that works.
I think that the output can be made a little nicer to look at like this:

@@ -98,7 +101,8 @@ dochelp:
 	@echo  '  cleandocs       - clean all generated files'
 	@echo
 	@echo  '  make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
-	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)'
+	@echo  '  top level values for SPHINXDIRS are:'
+	@echo  '$(_SPHINXDIRS)' | fmt -s -w 75 -g 75 | sed 's/^/    /'
 	@echo  '  you may also use a subdirectory like SPHINXDIRS=userspace-api/media,'
 	@echo  '  provided that there is an index.rst file at the subdirectory.'
 	@echo


although I would rather not assume a terminal width of 80.

thanks.
-- 
~Randy


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3] docs: Makefile: wrap SPHINXDIRS help text
  2025-12-26 21:37 ` Randy Dunlap
@ 2025-12-27 12:52   ` mustafaelrasheid
  2025-12-27 19:07     ` Randy Dunlap
  2026-01-06 21:37     ` Jonathan Corbet
  0 siblings, 2 replies; 5+ messages in thread
From: mustafaelrasheid @ 2025-12-27 12:52 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Jonathan Corbet, linux-doc, linux-kernel, Mustafa Elrasheid

From: Mustafa Elrasheid <mustafaelrasheid@gmail.com>

When using `make help`, SPHINXDIR doesn't wrap around 80 characters,
causing text to overflow or wrap in incorrect ways,
which then makes the text difficult to read

Signed-off-by: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
---
v3:
  - Moved SPHINXDIRS to a new line for better readability
  - Added `-g 75` to increase the goal of fmt instead of 93% of `-w 75`
v2:
  - Added '-s' in fmt to prevent word segmenting at the end of lines.
  - Reduced width in `fmt -w` to account for the added indentation of
    `sed`

 Documentation/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index e96ac6dcac4f..377a449656c8 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -98,7 +98,8 @@ dochelp:
 	@echo  '  cleandocs       - clean all generated files'
 	@echo
 	@echo  '  make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
-	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)'
+	@echo  '  top level values for SPHINXDIRS are:'
+	@echo  '$(_SPHINXDIRS)' | fmt -s -w 75 -g 75 | sed 's/^/    /'
 	@echo  '  you may also use a subdirectory like SPHINXDIRS=userspace-api/media,'
 	@echo  '  provided that there is an index.rst file at the subdirectory.'
 	@echo
-- 
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] docs: Makefile: wrap SPHINXDIRS help text
  2025-12-27 12:52   ` [PATCH v3] " mustafaelrasheid
@ 2025-12-27 19:07     ` Randy Dunlap
  2026-01-06 21:37     ` Jonathan Corbet
  1 sibling, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2025-12-27 19:07 UTC (permalink / raw)
  To: mustafaelrasheid; +Cc: Jonathan Corbet, linux-doc, linux-kernel



On 12/27/25 4:52 AM, mustafaelrasheid@gmail.com wrote:
> From: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
> 
> When using `make help`, SPHINXDIR doesn't wrap around 80 characters,
> causing text to overflow or wrap in incorrect ways,
> which then makes the text difficult to read
> 
> Signed-off-by: Mustafa Elrasheid <mustafaelrasheid@gmail.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> v3:
>   - Moved SPHINXDIRS to a new line for better readability
>   - Added `-g 75` to increase the goal of fmt instead of 93% of `-w 75`
> v2:
>   - Added '-s' in fmt to prevent word segmenting at the end of lines.
>   - Reduced width in `fmt -w` to account for the added indentation of
>     `sed`
> 
>  Documentation/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index e96ac6dcac4f..377a449656c8 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -98,7 +98,8 @@ dochelp:
>  	@echo  '  cleandocs       - clean all generated files'
>  	@echo
>  	@echo  '  make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
> -	@echo  '  top level values for SPHINXDIRS are: $(_SPHINXDIRS)'
> +	@echo  '  top level values for SPHINXDIRS are:'
> +	@echo  '$(_SPHINXDIRS)' | fmt -s -w 75 -g 75 | sed 's/^/    /'
>  	@echo  '  you may also use a subdirectory like SPHINXDIRS=userspace-api/media,'
>  	@echo  '  provided that there is an index.rst file at the subdirectory.'
>  	@echo

-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] docs: Makefile: wrap SPHINXDIRS help text
  2025-12-27 12:52   ` [PATCH v3] " mustafaelrasheid
  2025-12-27 19:07     ` Randy Dunlap
@ 2026-01-06 21:37     ` Jonathan Corbet
  1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2026-01-06 21:37 UTC (permalink / raw)
  To: mustafaelrasheid, Randy Dunlap; +Cc: linux-doc, linux-kernel, Mustafa Elrasheid

mustafaelrasheid@gmail.com writes:

> From: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
>
> When using `make help`, SPHINXDIR doesn't wrap around 80 characters,
> causing text to overflow or wrap in incorrect ways,
> which then makes the text difficult to read
>
> Signed-off-by: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
> ---
> v3:
>   - Moved SPHINXDIRS to a new line for better readability
>   - Added `-g 75` to increase the goal of fmt instead of 93% of `-w 75`
> v2:
>   - Added '-s' in fmt to prevent word segmenting at the end of lines.
>   - Reduced width in `fmt -w` to account for the added indentation of
>     `sed`
>
>  Documentation/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-06 21:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-26  8:56 [PATCH v2] docs: Makefile: wrap SPHINXDIRS help text mustafaelrasheid
2025-12-26 21:37 ` Randy Dunlap
2025-12-27 12:52   ` [PATCH v3] " mustafaelrasheid
2025-12-27 19:07     ` Randy Dunlap
2026-01-06 21:37     ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®