summaryrefslogtreecommitdiffstats
path: root/make/include
diff options
context:
space:
mode:
Diffstat (limited to 'make/include')
-rw-r--r--make/include/base.rules20
-rw-r--r--make/include/report.defs2
2 files changed, 21 insertions, 1 deletions
diff --git a/make/include/base.rules b/make/include/base.rules
index fd90d7769..65c03732f 100644
--- a/make/include/base.rules
+++ b/make/include/base.rules
@@ -14,3 +14,23 @@ report.var:
## needed for nested make (which drives each report)
report.true:
@true
+
+## linefeed is important
+define REPORT.help.item.global
+ @echo 'report.$(1)' | awk '{ printf(" %-21s $(REPORT.help.$(1))\n", $$0) }'
+
+endef
+define REPORT.help.item.module
+ @echo '$($(1).name).report' | awk '{ printf(" %-21s $(1)-scoped vars\n", $$0) }'
+
+endef
+
+REPORT.help.main = global general vars
+REPORT.help.gcc = global gcc vars (inherited by module GCC)
+REPORT.help.var = usage: make report.var name=VARNAME
+
+report.help:
+ @echo " AVAILABLE MAKEFILE VARS REPORTS"
+ @echo " ----------------------------------------------------------------"
+ $(foreach n,main gcc var,$(call REPORT.help.item.global,$n))
+ $(foreach n,$(MODULES.NAMES),$(call REPORT.help.item.module,$n))
diff --git a/make/include/report.defs b/make/include/report.defs
index 7962a6631..ce9c3e0fb 100644
--- a/make/include/report.defs
+++ b/make/include/report.defs
@@ -57,6 +57,6 @@ endif
## report: var
##
ifeq (var,$(REPORT))
-$(info $(call fn.PRINTVAR,$(NAME)))
+$(info $(call fn.PRINTVAR,$(name)))
$(info )
endif