[DTrace-devel] [PATCH 4/5] build: support make help-overrides and make help-options
Nick Alcock
nick.alcock at oracle.com
Wed Nov 29 16:08:28 UTC 2023
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>
---
Makeconfig | 8 +++++---
Makeoptions | 6 +++++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Makeconfig b/Makeconfig
index f6a28d8f79f5..ebf3c8b3f3c5 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -14,7 +14,7 @@ CONFIG_MK = $(objdir)/config.mk
#
# Syntax: $(call make-overrride-help,var,help-string)
define make-override-help
-help::
+help-overrides::
width=$$$$(printf '$(1)=[yes/no]' | wc -c); \
tabs=""; \
if [[ $$$${width} -gt 31 ]]; then \
@@ -139,7 +139,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))
@@ -154,5 +154,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.42.0.271.g85384428f1
More information about the DTrace-devel
mailing list