mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mustafaelrasheid@gmail.com
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mustafa Elrasheid <mustafaelrasheid@gmail.com>
Subject: [PATCH v3] docs: Makefile: wrap SPHINXDIRS help text
Date: Sat, 27 Dec 2025 15:52:44 +0300	[thread overview]
Message-ID: <20251227125244.6407-1-mustafaelrasheid@gmail.com> (raw)
In-Reply-To: <88fe4b63-13cd-47ce-8408-1e9d6f947b3a@infradead.org>

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


  reply	other threads:[~2025-12-27 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-26  8:56 [PATCH v2] " mustafaelrasheid
2025-12-26 21:37 ` Randy Dunlap
2025-12-27 12:52   ` mustafaelrasheid [this message]
2025-12-27 19:07     ` [PATCH v3] " Randy Dunlap
2026-01-06 21:37     ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251227125244.6407-1-mustafaelrasheid@gmail.com \
    --to=mustafaelrasheid@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®