lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88fe4b63-13cd-47ce-8408-1e9d6f947b3a@infradead.org>
Date: Fri, 26 Dec 2025 13:37:46 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: mustafaelrasheid@...il.com
Cc: Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] docs: Makefile: wrap SPHINXDIRS help text

Hi,

On 12/26/25 12:56 AM, mustafaelrasheid@...il.com wrote:
> From: Mustafa Elrasheid <mustafaelrasheid@...il.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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ