[DTrace-devel] [PATCH v3 2/9] build: support make help-overrides and make help-options

Nick Alcock nick.alcock at oracle.com
Fri Jan 26 13:58:42 UTC 2024


These provide only *part* of the make help output, and as a side
benefit shuffle the output into a somewhat better order.

Used by the upcoming configure script to avoid needlessly
reduplicating help text.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 Makeconfig  | 8 +++++---
 Makeoptions | 6 +++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Makeconfig b/Makeconfig
index b938724d3cab..cbde1d45421f 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -14,7 +14,7 @@ CONFIG_MK = $(objdir)/config.mk
 #
 # Syntax: $(call make-override-help,var,help-string)
 define make-override-help
-help::
+help-overrides::
 	width=$$$$(printf '$(1)=[yes/no]' | wc -c); \
 	tabs="\t\t\t\t"; \
 	if [[ $$$${width} -gt 31 ]]; then \
@@ -144,7 +144,7 @@ $(CONFIG_MK):
 	echo 'CONFIGURED := yes' >> $(objdir)/config.mk
 	cat $(objdir)/.config/*.mk >> $(objdir)/config.mk 2>/dev/null || true
 
-help::
+help-overrides::
 	printf "Overrides for library and symbol searches:\n\n" >&2
 
 $(eval $(call check-symbol-rule,ELF_GETSHDRSTRNDX,elf_getshdrstrndx,elf))
@@ -159,5 +159,7 @@ $(eval $(call check-header-rule,FUSE_NUMA,fuse_set_numa,fuse/fuse_lowlevel))
 $(eval $(call check-header-symbol-rule,CLOSE_RANGE,close_range(3,~0U,0),c,unistd))
 $(eval $(call check-header-rule,GETTID,gettid,unistd))
 
-help::
+help-overrides::
 	printf "\n" >&2
+
+help:: help-overrides
diff --git a/Makeoptions b/Makeoptions
index 25234092c6dd..859c13def124 100644
--- a/Makeoptions
+++ b/Makeoptions
@@ -11,15 +11,19 @@ coverage ?= no
 verbose ?= no
 libfuse2 ?= no
 
-help::
+help-options::
 	@printf "Options:\n\n" >&2
 	@printf "make debugging=yes [targets]\tDisable optimization to make debugger use easier\n" >&2
 	@printf "make coverage=yes [targets]\tTurn on coverage support in the testsuite\n" >&2
 	@printf "make verbose=yes [target]\tEnable verbose building\n" >&2
 	@printf "make dof_dbg=yes [targets]\tTurn on especially noisy DOF parser debugging\n\n" >&2
+
+help-dependencies::
 	@printf "Dependencies:\n\n" >&2
 	@printf "make libfuse2=yes [targets]\tBuild against libfuse 2 even if libfuse 3 is found\n\n" >&2
 
+help:: help-options help-dependencies
+
 ifneq ($(debugging),no)
 override CFLAGS += -O0 -g
 endif
-- 
2.43.0.272.gce700b77fd




More information about the DTrace-devel mailing list