linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ./Makefile: consider PAGER for `make help'
@ 2020-09-29 20:05 Dirk Gouders
  0 siblings, 0 replies; only message in thread
From: Dirk Gouders @ 2020-09-29 20:05 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek; +Cc: linux-kbuild, linux-kernel

`make help' outputs more than a screenfull of lines.

In case a user has PAGER defined in his environment, she most likely
wants it to be used in such situations.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
---
 Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Makefile b/Makefile
index 992d24467ca0..ce1b7e83a4c8 100644
--- a/Makefile
+++ b/Makefile
@@ -1531,7 +1531,14 @@ board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig)
 board-dirs := $(sort $(notdir $(board-dirs:/=)))
 
 PHONY += help
+ifdef PAGER
+PHONY += _help
 help:
+	$(Q)$(MAKE) _help | $(PAGER)
+_help:
+else
+help:
+endif
 	@echo  'Cleaning targets:'
 	@echo  '  clean		  - Remove most generated files but keep the config and'
 	@echo  '                    enough build support to build external modules'

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-29 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 20:05 [PATCH] ./Makefile: consider PAGER for `make help' Dirk Gouders

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).