Merge in more makefile edits from repo:voltha-docs

Change-Id: Iba7f6e565b45c5e888a34bce295d8fada8ab2ce2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b4cb667
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
+## Python
+.venv/
+__pycache__/
+
+## Python patch creation
+staging/
+
+# [EOF]
diff --git a/.gitreview b/.gitreview
old mode 100755
new mode 100644
index b07c4a6..53c1e62
--- a/.gitreview
+++ b/.gitreview
@@ -3,3 +3,4 @@
 port=29418
 project=onf-make.git
 defaultremote=origin
+defaultbranch=master
diff --git a/makefiles/git/include.mk b/makefiles/git/include.mk
index 7b51532..9d2558c 100644
--- a/makefiles/git/include.mk
+++ b/makefiles/git/include.mk
@@ -30,8 +30,8 @@
 -include $(ONF_MAKEDIR)/git/$(--repo-name--).mk
 
 ifdef USE-ONF-GIT-MK
-    # Dynamic loading when targets are requested by name
-    include $(ONF_MAKEDIR)/git/submodules.mk
+  # Dynamic loading when targets are requested by name
+  include $(ONF_MAKEDIR)/git/submodules.mk
 endif
 
 # [EOF]
diff --git a/makefiles/include.mk b/makefiles/include.mk
index b6b90a1..746252c 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 # -----------------------------------------------------------------------
-# Copyright 2022-2023 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.
@@ -13,8 +13,8 @@
 # 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.
-#
-# SPDX-FileCopyrightText: 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+# -----------------------------------------------------------------------
+# SPDX-FileCopyrightText: 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 # SPDX-License-Identifier: Apache-2.0
 # -----------------------------------------------------------------------
 # https://gerrit.opencord.org/plugins/gitiles/onf-make
diff --git a/makefiles/lint/doc8/include.mk b/makefiles/lint/doc8/include.mk
index 4764fa2..22a24fa 100644
--- a/makefiles/lint/doc8/include.mk
+++ b/makefiles/lint/doc8/include.mk
@@ -29,6 +29,13 @@
 # include $(ONF_MAKEDIR)/lint/doc8/help.mk
 include $(ONF_MAKEDIR)/lint/doc8/install.mk
 
+# -----------------------------------------------------------------------
+# Well that is annoying.  Cannot pass two --config switches, doc8 will
+# use only one.  Repos have more special exclusions so pass onf-make
+# doc8 config as command line args so local makefiles to use --config
+# -----------------------------------------------------------------------
+# lint-doc8-args += --config $(ONF_MAKEDIR)/lint/doc8/doc8.ini
+
 ## -----------------------------------------------------------------------
 ## -----------------------------------------------------------------------
 ifndef NO-LINT-DOC8
@@ -42,13 +49,15 @@
 
 ## -----------------------------------------------------------------------
 ## -----------------------------------------------------------------------
-lint-doc8-excl := $(foreach dir,$(onf-excl-dirs),--ignore-path "$(dir)")
+## [TODO] - move lint-doc8-excl into doc8.ini
+# lint-doc8-excl := $(foreach dir,$(onf-excl-dirs) $(lint-doc8-excl),--ignore-path "$(dir)")
+lint-doc8-excl := $(null)
 lint-doc8: lint-doc8-cmd-version
 
 	$(call banner-enter,Target $@)
 	$(activate) && doc8 --version
 	@echo
-	$(activate) && doc8 $(lint-doc8-excl)
+	$(activate) && doc8 $(lint-doc8-excl) $(lint-doc8-args)
 	$(call banner-enter,Target $@)
 
 ## -----------------------------------------------------------------------
diff --git a/makefiles/lint/groovy/include.mk b/makefiles/lint/groovy/include.mk
index 5959fe0..5bea853 100644
--- a/makefiles/lint/groovy/include.mk
+++ b/makefiles/lint/groovy/include.mk
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefiles.lint.groovy.version = 1.1.1 (+local edits)
+# -----------------------------------------------------------------------
 
 ##-------------------##
 ##---]  GLOBALS  [---##
@@ -29,6 +32,10 @@
 ##-------------------##
 ##---]  TARGETS  [---##
 ##-------------------##
+
+## -----------------------------------------------------------------------
+## Intent: Enabled by repository_sandbox_root/config.mk
+## -----------------------------------------------------------------------
 ifndef NO-LINT-GROOVY
   lint : lint-groovy
 endif
@@ -37,7 +44,7 @@
 ## All or on-demand
 ##   make lint-groovy BY_SRC="a/b/c.groovy d/e/f.groovy"
 ## -----------------------------------------------------------------------
-ifdef LINT_SRC
+ifdef GROOVY_SRC
   lint-groovy : lint-groovy-src
 else
   lint-groovy : lint-groovy-all
@@ -53,33 +60,36 @@
   | $(xargs-n1) $(groovy-check) $(groovy-check-args)
 
 ## -----------------------------------------------------------------------
-## Intent: Perform lint check on a named list of files
+## Intent: On-demand lint checking
 ## -----------------------------------------------------------------------
-BY_SRC ?= $(error $(MAKE) $@ BY_SRC= is required)
 lint-groovy-src:
+  ifndef GROOVY_SRC
+	@echo "ERROR: Usage: $(MAKE) $@ GROOVY_SRC="
+	@exit 1
+  endif
 	$(groovy-check) --version
 	@echo
-#	$(foreach fyl,$(BY_SRC),$(groovy-check) $(groovy-check-args) $(fyl))
-	$(groovy-check) $(groovy-check-args) $(BY_SRC)
+	$(HIDE) $(groovy-check) $(groovy-check-args) $(GROOVY_SRC)
 
 ## -----------------------------------------------------------------------
 ## Intent: Perform lint check on a named list of files
 ## -----------------------------------------------------------------------
-BYGIT = $(shell git diff --name-only HEAD | grep '\.groovy')
+# lint-groovy-bygit = $(shell git diff --name-only HEAD | grep '\.groovy')
+lint-groovy-bygit = $(git status -s | grep '\.sh' | grep -v -e '^D' -e '^?' | cut -c4-)
 lint-groovy-mod:
 	$(groovy-check) --version
 	@echo
-	$(foreach fyl,$(BYGIT),$(groovy-check) $(groovy-check-args) $(fyl))
+	$(foreach fyl,$(lint-groovy-bygit),$(groovy-check) $(groovy-check-args) $(fyl))
 
 ## -----------------------------------------------------------------------
 ## Intent: Display command help
 ## -----------------------------------------------------------------------
 help-summary ::
 	@echo '  lint-groovy          Conditionally lint groovy source'
-	@echo '      BY_SRC=a/b/c.groovy d/e/f.groovy'
   ifdef VERBOSE
-	@echo '  lint-groovy-all    Lint all available sources'
-	@echo '  lint-groovy-mod    Lint locally modified (git status)'
-	@echo '  lint-groovy-src    Lint individually (BY_SRC=list-of-files)'
+	@echo '  lint-groovy-all      Lint all available sources'
+	@echo '  lint-groovy-mod      Lint locally modified (git status)'
+	@echo '  lint-groovy-src      Lint individually (BY_SRC=list-of-files)'
   endif
+
 # [EOF]
diff --git a/makefiles/lint/robot.mk b/makefiles/lint/robot.mk
index f33c4ba..d9ce670 100644
--- a/makefiles/lint/robot.mk
+++ b/makefiles/lint/robot.mk
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 # -----------------------------------------------------------------------
-# Copyright 2017-2023 Open Networking Foundation
+# 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.
diff --git a/makefiles/lint/shell.mk b/makefiles/lint/shell.mk
index b1a083b..1aeb7c0 100644
--- a/makefiles/lint/shell.mk
+++ b/makefiles/lint/shell.mk
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.1
+# -----------------------------------------------------------------------
 
 ##-------------------##
 ##---]  GLOBALS  [---##
@@ -27,10 +30,11 @@
 shell-check-find += -o \( -name '*.sh' \)
 shell-check-find += -type f -print0
 
-# shell-check    := $(env-clean) pylint
-shell-check      := shellcheck
+shell-check    := $(env-clean) shellcheck
+# shell-check      := shellcheck
 
-shell-check-args += -a
+shell-check-args += --check-sourced
+shell-check-args += --external-sources
 
 ##-------------------##
 ##---]  TARGETS  [---##
@@ -40,18 +44,61 @@
 endif
 
 ## -----------------------------------------------------------------------
+## All or on-demand
+## -----------------------------------------------------------------------
+ifdef LINT_SRC
+  lint-shell : lint-shell-src
+else
+  lint-shell : lint-shell-all
+endif
+
+## -----------------------------------------------------------------------
 ## Intent: Perform a lint check on command line script sources
 ## -----------------------------------------------------------------------
-lint-shell:
+lint-shell-all:
 	$(shell-check) -V
 	@echo
 	$(HIDE)$(env-clean) $(shell-check-find) \
 	    | $(xargs-n1) $(shell-check) $(shell-check-args)
 
 ## -----------------------------------------------------------------------
+## Intent: On-demand lint checking
+## -----------------------------------------------------------------------
+lint-shell-src:
+  ifndef SHELL_SRC
+	@echo "ERROR: Usage: $(MAKE) $@ SHELL_SRC="
+	@exit 1
+  endif
+	$(shell-check) --version
+	@echo
+	$(HIDE) $(shell-check) $(shell-check-args) $(SHELL_SRC)
+
+## -----------------------------------------------------------------------
+## Intent: Perform lint check on a named list of files
+## -----------------------------------------------------------------------
+# git show --diff-filter=AM --pretty="format:" --name-only #{commitId}
+# lint-shell-bygit = $(shell git diff --name-only HEAD | grep '\.sh')
+lint-shell-bygit = $(git status -s | grep '\.sh' | grep -v -e '^D' -e '^?' | cut -c4-)
+
+# $(error lint-shell-bygit = $(lint-shell-bygit))
+lint-shell-mod:
+	$(shell-check) --version
+	@echo
+	$(foreach fyl,$(lint-shell-bygit),$(shell-check) $(shell-check-args) $(fyl))
+
+## -----------------------------------------------------------------------
 ## Intent: Display command help
 ## -----------------------------------------------------------------------
 help-summary ::
-	@echo '  lint-shell          Syntax check shell sources'
+	@echo '  lint-shell          Conditionally lint shell source'
+  ifdef VERBOSE
+	@echo '  lint-shell-all      Lint all available sources'
+	@echo '  lint-shell-mod      Lint locally modified (git status)'
+	@echo '  lint-shell-src      Lint individually (BY_SRC=list-of-files)'
+  endif
+
+# [SEE ALSO]
+# -----------------------------------------------------------------------
+#   o https://www.shellcheck.net/wiki/Directive
 
 # [EOF]
diff --git a/makefiles/virtualenv/lib/python3.10/site-packages/robot/utils/normalizing.py/patch b/makefiles/virtualenv/patches/lib/python3.10/site-packages/robot/utils/normalizing.py/patch
similarity index 100%
rename from makefiles/virtualenv/lib/python3.10/site-packages/robot/utils/normalizing.py/patch
rename to makefiles/virtualenv/patches/lib/python3.10/site-packages/robot/utils/normalizing.py/patch
diff --git a/makefiles/virtualenv/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch b/makefiles/virtualenv/patches/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch
similarity index 100%
rename from makefiles/virtualenv/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch
rename to makefiles/virtualenv/patches/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch
diff --git a/makefiles/virtualenv/lib/python3.10/site-packages/sphinx/util/typing.py/patch b/makefiles/virtualenv/patches/lib/python3.10/site-packages/sphinx/util/typing.py/patch
similarity index 100%
rename from makefiles/virtualenv/lib/python3.10/site-packages/sphinx/util/typing.py/patch
rename to makefiles/virtualenv/patches/lib/python3.10/site-packages/sphinx/util/typing.py/patch
diff --git a/makefiles/virtualenv/lib/python3.10/site-packages/sphinxcontrib/openapi/utils.py/patch b/makefiles/virtualenv/patches/lib/python3.10/site-packages/sphinxcontrib/openapi/utils.py/patch
similarity index 100%
rename from makefiles/virtualenv/lib/python3.10/site-packages/sphinxcontrib/openapi/utils.py/patch
rename to makefiles/virtualenv/patches/lib/python3.10/site-packages/sphinxcontrib/openapi/utils.py/patch