blob: 3134a385a7e4290eea4a881c32da10cb81690fe8 [file] [log] [blame]
Joey Armstrong28eddda2023-01-10 03:09:34 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
3# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# -----------------------------------------------------------------------
17
Joey Armstrong068d6452023-02-01 11:09:18 -050018##-------------------##
19##---] GLOBALS [---##
20##-------------------##
21.PHONY: help help-summary help-simple help-verbose
22
23##-------------------##
24##---] TARGETS [---##
25##-------------------##
26
27## -----------------------------------------------------------------------
28## Intent: Render topic/tool based makefile help
29## -----------------------------------------------------------------------
30## Three targets are used to render conditional makefile help
31## help-summary A one-line target summary for the topic
32## help-simple Common targets for the topic (lint-helm, build, test)
33## help-verbose Exhaustive display of supported targets
34## -----------------------------------------------------------------------
35## [COOKBOOK]
36## help colon-colon All 'help' targets are evaluated for 'make help'
37## help-banner Display a usage banner for help
38## help-summary Display all one-line topic summary help
39## [conditonal]
40## help-simple Display all common topic makefile targets.
41## help-verbose Exhaustive display of makefile target help.
42## VERBOSE=
43## -----------------------------------------------------------------------
44## [See Also] makefiles/gerrit/{include.mk, help.mk}
45## help-gerrit Summary targets can always be used to display topic help
46## help-verbose Exhaustive gerrit target display.
47## -----------------------------------------------------------------------
48help :: help-banner help-summary
49
50## -----------------------------------------------------------------------
51## Intent: Display a usage banner for help. Target will be evaluated
52## before all other help display.
53## -----------------------------------------------------------------------
54help-banner:
Joey Armstrong28eddda2023-01-10 03:09:34 -050055 @echo "Usage: $(MAKE) [options] [target] ..."
Joey Armstrong068d6452023-02-01 11:09:18 -050056
57## -----------------------------------------------------------------------
58## Intent: Display extended help.
59## -----------------------------------------------------------------------
60## Question:
61## o Help display can be long based on volume of targets.
62## o Should a 3rd case be added to display:
63## - help-simple (one-liner help) by default
64## - conditional display of extended help:
65## - help-simple or help-verbose
66## o Current logic displays extended help by default.
67## -----------------------------------------------------------------------
68ifdef VERBOSE
69 help :: help-verbose
70else
71 help :: help-simple
72endif
73
74## -----------------------------------------------------------------------
75## Intent: Display simple extended target help
76## -----------------------------------------------------------------------
77help-simple ::
Joey Armstrong28eddda2023-01-10 03:09:34 -050078 @echo
Joey Armstrong28eddda2023-01-10 03:09:34 -050079 @echo '[VIEW]'
Joey Armstrong068d6452023-02-01 11:09:18 -050080 @echo ' reload Setup to auto-reload sphinx doc changes in browser'
81 @echo ' view-html View generated documentation'
Joey Armstrong28eddda2023-01-10 03:09:34 -050082 @echo
83 @echo '[TEST]'
Joey Armstrong068d6452023-02-01 11:09:18 -050084 @echo " test $(MAKE) lint linkcheck"
85 @echo " test-all $(MAKE) all-generation-targets"
Joey Armstrong28eddda2023-01-10 03:09:34 -050086
87# [EOF]