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/lint/help.mk b/makefiles/lint/help.mk
new file mode 100644
index 0000000..24a5aa1
--- /dev/null
+++ b/makefiles/lint/help.mk
@@ -0,0 +1,31 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2021-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -----------------------------------------------------------------------
+
+help ::
+
+# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+help-summary ::
+ @echo ' help-lint Display lint target help'
+
+help-simple :: help-lint
+help-lint :
+ @echo
+ @echo "[LINT]"
+ @echo ' help-lint Display lint target help'
+
+# [EOF]
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index aa6867b..66834a6 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -13,6 +13,7 @@
include $(ONF_MAKE)/lint/makefile.mk
include $(ONF_MAKE)/lint/python.mk
include $(ONF_MAKE)/lint/shell.mk
+include $(ONF_MAKE)/lint/help.mk
ifdef YAML_FILES
include $(ONF_MAKE)/lint/yaml/python.mk
diff --git a/makefiles/lint/makefile.mk b/makefiles/lint/makefile.mk
index 8ebe9c3..6e1d80a 100644
--- a/makefiles/lint/makefile.mk
+++ b/makefiles/lint/makefile.mk
@@ -1,6 +1,18 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
# -----------------------------------------------------------------------
##-------------------##
@@ -32,14 +44,16 @@
endif
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on makefile sources
## -----------------------------------------------------------------------
lint-make:
$(HIDE)$(env-clean) $(make-check-find) \
| $(xargs-n1-local) $(make-check) $(make-check-args)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
-help ::
- @echo ' lint-make Syntax check [Mm]akefile and *.mk'
+help-summary ::
+ @echo ' lint-make Syntax check [Mm]akefile and *.mk'
# [EOF]
diff --git a/makefiles/lint/python.mk b/makefiles/lint/python.mk
index a3d651c..d3fe4fd 100644
--- a/makefiles/lint/python.mk
+++ b/makefiles/lint/python.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -38,14 +38,16 @@
endif
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on makefile sources
## -----------------------------------------------------------------------
lint-python:
$(HIDE)$(env-clean) $(python-check-find) \
| $(xargs-n1) $(python-check) $(python-check-args)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
-help ::
- @echo ' lint-python Syntax check python sources'
+help-summary ::
+ @echo ' lint-python Syntax check python sources (*.py)'
# [EOF]
diff --git a/makefiles/lint/shell.mk b/makefiles/lint/shell.mk
index cadc084..b1a083b 100644
--- a/makefiles/lint/shell.mk
+++ b/makefiles/lint/shell.mk
@@ -1,6 +1,18 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
# -----------------------------------------------------------------------
##-------------------##
@@ -28,6 +40,7 @@
endif
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on command line script sources
## -----------------------------------------------------------------------
lint-shell:
$(shell-check) -V
@@ -36,8 +49,9 @@
| $(xargs-n1) $(shell-check) $(shell-check-args)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
-help ::
- @echo ' lint-shell Syntax check shell sources'
+help-summary ::
+ @echo ' lint-shell Syntax check shell sources'
# [EOF]
diff --git a/makefiles/lint/yaml.mk b/makefiles/lint/yaml.mk
index 00241b3..b60e616 100644
--- a/makefiles/lint/yaml.mk
+++ b/makefiles/lint/yaml.mk
@@ -27,6 +27,6 @@
; yamllint -s $(YAML_FILES)
help::
- @echo " lint-yaml Syntax check yaml source using yamllint"
+ @echo " lint-yaml Syntax check yaml source using yamllint"
# [EOF]
diff --git a/makefiles/lint/yaml/python.mk b/makefiles/lint/yaml/python.mk
index 868d9b7..316afd3 100644
--- a/makefiles/lint/yaml/python.mk
+++ b/makefiles/lint/yaml/python.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-FileCopyrightText: 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
@@ -32,10 +32,16 @@
lint-yaml: $(venv-activate)
lint-yaml: $(lint-yaml-dep)
+## -----------------------------------------------------------------------
+## Intent: Perform a lint check on yaml sources
+## -----------------------------------------------------------------------
$(lint-yaml-dep):
$(vst-env) && yamllint -s $(call lint-yaml-src,$@)
-help::
- @echo " lint-yaml Syntax check yaml sources"
+## -----------------------------------------------------------------------
+## Intent: Display command help
+## -----------------------------------------------------------------------
+help-summary ::
+ @echo ' lint-yaml Syntax check yaml sources (python -M yaml)'
# [EOF]
diff --git a/makefiles/lint/yaml/yamllint.mk b/makefiles/lint/yaml/yamllint.mk
index 6782c74..dc4e015 100644
--- a/makefiles/lint/yaml/yamllint.mk
+++ b/makefiles/lint/yaml/yamllint.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-FileCopyrightText: 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
@@ -41,15 +41,18 @@
yamllint-find += -print0
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on yaml sources
## -----------------------------------------------------------------------
lint lint-yaml:
$(HIDE)$(env-clean) $(yamllint-find) \
- | xargs -0 --no-run-if-empty -t -n1 $(yamllint) $(yamllint-args)
+ | $(xargs-n1-clean) -t $(yamllint) $(yamllint-args)
+# | xargs -0 --no-run-if-empty -t -n1 $(yamllint) $(yamllint-args)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
help::
- @echo " lint-yaml Syntax check yaml sources"
+ @echo " lint-yaml Syntax check yaml sources (yamllint)"
$(if $(DEBUG),$(warning ENTER))