make help target cleanup
Makefile
makefiles/help/include.mk
makefiles/lint/include.mk
makefiles/lint/makefile.mk
makefiles/lint/.........mk
-------------------------
o Implement topic help:: using 3 distinct targets.
o help-summary - displays one-line topic help.
o help-simple - displays common topic help (lint, build, test)
o help-verbose - exhaustive topic help for targets.
o help (default) help-summary + help-simple (see {gerrit,lint}/help.mk)
o Align all help text on string '[target]' from make cmd usage.
o Restore JJB_VERSION ?= 2.8.0 in case of variant conflict with v4.1.0 in use.
makefiles/gerrit/help.mk
makefiles/gerrit/include.mk
---------------------------
o Add gerrit command line convenience targets.
o replication-status target shows health of gerrit-to-github mirror.
jjb/voltha-scale.yaml
---------------------
o Lint cleanups, remove duplicate definitions.
Change-Id: I1c40fc0b5a61e3962e3481f0eae7266c5a6f2b2e
diff --git a/makefiles/help/include.mk b/makefiles/help/include.mk
index 4450784..3134a38 100644
--- a/makefiles/help/include.mk
+++ b/makefiles/help/include.mk
@@ -15,17 +15,73 @@
# limitations under the License.
# -----------------------------------------------------------------------
-# Parent makefile should include this early so help
-# message will be prefixed by a usage statement.
-help ::
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+.PHONY: help help-summary help-simple help-verbose
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+
+## -----------------------------------------------------------------------
+## Intent: Render topic/tool based makefile help
+## -----------------------------------------------------------------------
+## Three targets are used to render conditional makefile help
+## help-summary A one-line target summary for the topic
+## help-simple Common targets for the topic (lint-helm, build, test)
+## help-verbose Exhaustive display of supported targets
+## -----------------------------------------------------------------------
+## [COOKBOOK]
+## help colon-colon All 'help' targets are evaluated for 'make help'
+## help-banner Display a usage banner for help
+## help-summary Display all one-line topic summary help
+## [conditonal]
+## help-simple Display all common topic makefile targets.
+## help-verbose Exhaustive display of makefile target help.
+## VERBOSE=
+## -----------------------------------------------------------------------
+## [See Also] makefiles/gerrit/{include.mk, help.mk}
+## help-gerrit Summary targets can always be used to display topic help
+## help-verbose Exhaustive gerrit target display.
+## -----------------------------------------------------------------------
+help :: help-banner help-summary
+
+## -----------------------------------------------------------------------
+## Intent: Display a usage banner for help. Target will be evaluated
+## before all other help display.
+## -----------------------------------------------------------------------
+help-banner:
@echo "Usage: $(MAKE) [options] [target] ..."
+
+## -----------------------------------------------------------------------
+## Intent: Display extended help.
+## -----------------------------------------------------------------------
+## Question:
+## o Help display can be long based on volume of targets.
+## o Should a 3rd case be added to display:
+## - help-simple (one-liner help) by default
+## - conditional display of extended help:
+## - help-simple or help-verbose
+## o Current logic displays extended help by default.
+## -----------------------------------------------------------------------
+ifdef VERBOSE
+ help :: help-verbose
+else
+ help :: help-simple
+endif
+
+## -----------------------------------------------------------------------
+## Intent: Display simple extended target help
+## -----------------------------------------------------------------------
+help-simple ::
@echo
@echo '[VIEW]'
- @echo ' reload Setup to auto-reload sphinx doc changes in browser'
- @echo ' view-html View generated documentation'
+ @echo ' reload Setup to auto-reload sphinx doc changes in browser'
+ @echo ' view-html View generated documentation'
@echo
@echo '[TEST]'
- @echo ' test make lint linkcheck'
- @echo ' test-all make all-generation-targets'
+ @echo " test $(MAKE) lint linkcheck"
+ @echo " test-all $(MAKE) all-generation-targets"
# [EOF]
diff --git a/makefiles/help/trailer.mk b/makefiles/help/trailer.mk
index dac7e15..c24934f 100644
--- a/makefiles/help/trailer.mk
+++ b/makefiles/help/trailer.mk
@@ -20,14 +20,14 @@
help ::
@echo
@echo '[CLEAN]'
- @echo ' clean Remove generated targets'
- @echo ' sterile clean + remove virtual env interpreter install'
+ @echo ' clean Remove generated targets'
+ @echo ' sterile clean + remove virtual env interpreter install'
help ::
@echo
@echo '[HELP]'
- @echo ' help Display program help'
- @echo ' help-verbose Display additional targets and help'
+ @echo ' help Display program help'
+ @echo ' help-verbose Display additional targets and help'
help ::
@echo
diff --git a/makefiles/help/variables.mk b/makefiles/help/variables.mk
index 80171a7..a22b179 100644
--- a/makefiles/help/variables.mk
+++ b/makefiles/help/variables.mk
@@ -31,6 +31,6 @@
@echo '[VARIABLES] - Conditional makefile behavior'
@echo ' NO_PATCHES= Do not apply patches to the python virtualenv'
@echo ' NO_OTHER_REPO_DOCS= No foreign repos, only apply target to local sources.'
- @echo ' VERBOSE= Display extended help'
+ @echo ' VERBOSE= Display extended help topics'
# [EOF]