[VOL-5321] - Add repo:onf-make as a git submodule.

Makefile
lf/transition.mk
----------------
  o Add bridge logic to conditionally load legacy makefiles or repo:onf-make.
  o transition.mk allows logic to gradually be replaced.
  o makefiles/ directory can eventually be removed after all
    dependencies on local makefile logic have been removed.

makefiles/
----------
  o Replace make var(s) ONF_MAKEDIR= and ONF_MAKE= with var legacy-mk=.

makefiles/commands/include.mk
makefiles/commands/kail/godownloader.sh
---------------------------------------
  o Replace loading legacy kail logic with library makefiles.
  o Git submodule scripts contain linting cleanup for scripts.

Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I152251039fc3b330ed1a6729922e465c53d00879
diff --git a/makefiles/commands/include.mk b/makefiles/commands/include.mk
index 1df1085..f64574a 100644
--- a/makefiles/commands/include.mk
+++ b/makefiles/commands/include.mk
@@ -25,7 +25,7 @@
 
 $(if $(DEBUG),$(warning ENTER))
 
-include $(ONF_MAKEDIR)/commands/kail.mk
+include $(legacy-mk)/commands/kail.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/commands/kail/godownloader.sh b/makefiles/commands/kail/godownloader.sh
index 77ad5bf..63354bb 100755
--- a/makefiles/commands/kail/godownloader.sh
+++ b/makefiles/commands/kail/godownloader.sh
@@ -1,8 +1,25 @@
 #!/bin/sh
-set -e
+# -----------------------------------------------------------------------
+# SPDX-License-Identifier: LicenseRef-MIT
+# SPDX-FileCopyrightText: Copyright (c) 2017-2019 Nick Galbreath
+# -----------------------------------------------------------------------
 # Code generated by godownloader on 2019-05-28T19:49:53Z. DO NOT EDIT.
 # Copyright 2019 - (disable makefiles/lint/license.mk)
-#
+# -----------------------------------------------------------------------
+# Intent:
+#   https://pkg.go.dev/github.com/golangci/godownloader
+#   https://github.com/boz/kail/blob/v0.15.1/godownloader.sh
+#   https://github.com/golangci/godownloader/blob/8788aabdf9391ad712052a4185e8047f8c2fcac5/LICENSE.md
+# -----------------------------------------------------------------------
+# Background:
+#   o The project has been deendent on godwnloader.sh to install kail.
+#   o godownloader.sh was deprecated, replaced by goreleaser.
+#   o A static of the script was checked in, exactly what is needed.
+#   o godownloader has been forked, use download if released and persistent:
+#       https://github.com/kamilsk/godownloader
+# -----------------------------------------------------------------------
+
+set -e
 
 usage() {
   this=$1
@@ -39,6 +56,7 @@
   shift $((OPTIND - 1))
   TAG=$1
 }
+
 # this function wraps all the destructive operations
 # if a curl|bash cuts off the end of the script due to
 # network, either nothing will happen or will syntax error
@@ -122,16 +140,20 @@
 but credit (and pull requests) appreciated.
 ------------------------------------------------------------------------
 EOF
+
 is_command() {
   command -v "$1" >/dev/null
 }
 echoerr() {
   echo "$@" 1>&2
 }
+
 log_prefix() {
+    # shellcheck disable=SC2317
   echo "$0"
 }
 _logp=6
+
 log_set_priority() {
   _logp="$1"
 }
@@ -190,7 +212,7 @@
     armv6*) arch="armv6" ;;
     armv7*) arch="armv7" ;;
   esac
-  echo ${arch}
+  echo "${arch}"
 }
 uname_os_check() {
   os=$(uname_os)
diff --git a/makefiles/docker/include.mk b/makefiles/docker/include.mk
index ee27e10..5325305 100644
--- a/makefiles/docker/include.mk
+++ b/makefiles/docker/include.mk
@@ -18,7 +18,7 @@
 $(if $(DEBUG),$(warning ENTER))
 
 # Per-repository
-include $(ONF_MAKEDIR)/docker/config/$(--repo-name--).mk
+include $(legacy-mk)/docker/config/$(--repo-name--).mk
 
 # ------------------- ##
 # ---]  GLOBALS  [--- ##
diff --git a/makefiles/gerrit/include.mk b/makefiles/gerrit/include.mk
index 1c5ad2c..4227229 100644
--- a/makefiles/gerrit/include.mk
+++ b/makefiles/gerrit/include.mk
@@ -18,7 +18,7 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-include $(ONF_MAKEDIR)/gerrit/help.mk
+include $(legacy-mk)/gerrit/help.mk
 
 # -----------------------------------------------------------------------
 # -----------------------------------------------------------------------
diff --git a/makefiles/git/include.mk b/makefiles/git/include.mk
index 68525dc..be8b80e 100644
--- a/makefiles/git/include.mk
+++ b/makefiles/git/include.mk
@@ -29,14 +29,14 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-include $(ONF_MAKEDIR)/git/help.mk
-include $(ONF_MAKEDIR)/git/required.mk
+include $(legacy-mk)/git/help.mk
+include $(legacy-mk)/git/required.mk
 
 ## Special snowflake: per-repository logic loader
--include $(ONF_MAKEDIR)/git/byrepo/$(--repo-name--).mk
+-include $(legacy-mk)/git/byrepo/$(--repo-name--).mk
 
 # Dynamic loading when targets are requested by name
-include $(ONF_MAKEDIR)/git/submodules.mk
+include $(legacy-mk)/git/submodules.mk
 
 endif # --onf-make-git--
 
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 012d505..79c2aaf 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -35,34 +35,34 @@
 
 TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs))
 
-include $(ONF_MAKEDIR)/consts.mk
-include $(ONF_MAKEDIR)/help/include.mk       # render target help
-include $(ONF_MAKEDIR)/utils/include.mk      # dependency-less helper macros
-include $(ONF_MAKEDIR)/etc/include.mk        # banner macros
-include $(ONF_MAKEDIR)/commands/include.mk   # Tools and local installers
+include $(legacy-mk)/consts.mk
+include $(legacy-mk)/help/include.mk       # render target help
+include $(legacy-mk)/utils/include.mk      # dependency-less helper macros
+include $(legacy-mk)/etc/include.mk        # banner macros
+include $(legacy-mk)/commands/include.mk   # Tools and local installers
 
-include $(ONF_MAKEDIR)/virtualenv.mk#        # lint-{jjb,python} depends on venv
-include $(ONF_MAKEDIR)/lint/include.mk
+include $(legacy-mk)/virtualenv.mk#        # lint-{jjb,python} depends on venv
+include $(legacy-mk)/lint/include.mk
 
-include $(ONF_MAKEDIR)/gerrit/include.mk
-include $(ONF_MAKEDIR)/git/include.mk
-include $(ONF_MAKEDIR)/jjb/include.mk
+include $(legacy-mk)/gerrit/include.mk
+include $(legacy-mk)/git/include.mk
+include $(legacy-mk)/jjb/include.mk
 
-# include $(ONF_MAKEDIR)/release/include.mk
+# include $(legacy-mk)/release/include.mk
 
-include $(ONF_MAKEDIR)/todo.mk
-include $(ONF_MAKEDIR)/help/variables.mk
+include $(legacy-mk)/todo.mk
+include $(legacy-mk)/help/variables.mk
 
 ##---------------------##
 ##---]  ON_DEMAND  [---##
 ##---------------------##
-$(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk))
-$(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
+$(if $(USE-ONF-GERRIT-MK),$(eval include $(legacy-mk)/gerrit/include.mk))
+$(if $(USE-ONF-DOCKER-MK),$(eval include $(legacy-mk)/docker/include.mk))
 
 ##-------------------##
 ##---]  TARGETS  [---##
 ##-------------------##
-include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile, tox
+include $(legacy-mk)/targets/include.mk # clean, sterile, tox
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/jjb/include.mk b/makefiles/jjb/include.mk
index 7af018c..ebf2104 100644
--- a/makefiles/jjb/include.mk
+++ b/makefiles/jjb/include.mk
@@ -23,12 +23,12 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-include $(ONF_MAKEDIR)/jjb/help.mk
-include $(ONF_MAKEDIR)/jjb/required.mk
+include $(legacy-mk)/jjb/help.mk
+include $(legacy-mk)/jjb/required.mk
 
 ifdef USE-ONF-JJB-MK
   # Dynamic loading when targets are requested by name
-  include $(ONF_MAKEDIR)/jjb/targets.mk
+  include $(legacy-mk)/jjb/targets.mk
 endif
 
 # [EOF]
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index 2102fc9..f21af76 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -36,17 +36,17 @@
 #   NO-LINT-PYLINT := true
 # endif
 
-include $(ONF_MAKEDIR)/lint/groovy.mk
-include $(ONF_MAKEDIR)/lint/jjb.mk
-include $(ONF_MAKEDIR)/lint/json.mk
-include $(ONF_MAKEDIR)/lint/license/include.mk
-include $(ONF_MAKEDIR)/lint/makefile.mk
-include $(ONF_MAKEDIR)/lint/python/include.mk
-include $(ONF_MAKEDIR)/lint/shellcheck/include.mk
-include $(ONF_MAKEDIR)/lint/tox/include.mk
-include $(ONF_MAKEDIR)/lint/yaml/include.mk
+include $(legacy-mk)/lint/groovy.mk
+include $(legacy-mk)/lint/jjb.mk
+include $(legacy-mk)/lint/json.mk
+include $(legacy-mk)/lint/license/include.mk
+include $(legacy-mk)/lint/makefile.mk
+include $(legacy-mk)/lint/python/include.mk
+include $(legacy-mk)/lint/shellcheck/include.mk
+include $(legacy-mk)/lint/tox/include.mk
+include $(legacy-mk)/lint/yaml/include.mk
 
-include $(ONF_MAKEDIR)/lint/help.mk
+include $(legacy-mk)/lint/help.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/lint/include.mk.bk b/makefiles/lint/include.mk.bk
index dbc2e8b..709c32a 100644
--- a/makefiles/lint/include.mk.bk
+++ b/makefiles/lint/include.mk.bk
@@ -9,14 +9,14 @@
 	@echo
 	@echo "[LINT]"
 
-include $(ONF_MAKE)/lint/makefile.mk
-include $(ONF_MAKE)/lint/python.mk
-include $(ONF_MAKE)/lint/shell.mk
+include $(legacy-mk)/lint/makefile.mk
+include $(legacy-mk)/lint/python.mk
+include $(legacy-mk)/lint/shell.mk
 
 ifdef YAML_FILES
-  include $(ONF_MAKE)/lint/yaml/python.mk
+  include $(legacy-mk)/lint/yaml/python.mk
 else
-  include $(ONF_MAKE)/lint/yaml/yamllint.mk
+  include $(legacy-mk)/lint/yaml/yamllint.mk
 endif
 
 $(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/python/include.mk b/makefiles/lint/python/include.mk
index 29b4e84..5944bbf 100644
--- a/makefiles/lint/python/include.mk
+++ b/makefiles/lint/python/include.mk
@@ -22,9 +22,9 @@
 ##-------------------##
 $(if $(UNSTABLE),$(eval lint-python-all := true))
 
-include $(ONF_MAKEDIR)/lint/python/find_utils.mk
-include $(ONF_MAKEDIR)/lint/python/flake8.mk
-include $(ONF_MAKEDIR)/lint/python/pylint.mk
+include $(legacy-mk)/lint/python/find_utils.mk
+include $(legacy-mk)/lint/python/flake8.mk
+include $(legacy-mk)/lint/python/pylint.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/lint/shellcheck/include.mk b/makefiles/lint/shellcheck/include.mk
index 329ce8d..5d7309b 100644
--- a/makefiles/lint/shellcheck/include.mk
+++ b/makefiles/lint/shellcheck/include.mk
@@ -22,11 +22,11 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-# include $(ONF_MAKEDIR)/lint/shellcheck/help.mk
-include $(ONF_MAKEDIR)/lint/shellcheck/find_utils.mk
+# include $(legacy-mk)/lint/shellcheck/help.mk
+include $(legacy-mk)/lint/shellcheck/find_utils.mk
 
 # Standard lint-yaml targets
-include $(ONF_MAKEDIR)/lint/shellcheck/shellcheck.mk
+include $(legacy-mk)/lint/shellcheck/shellcheck.mk
 
 mk-include--onf-lint-shellcheck := true#        # Flag to inhibit re-including
 
diff --git a/makefiles/lint/tox/include.mk b/makefiles/lint/tox/include.mk
index 29dfc8c..ba10793 100644
--- a/makefiles/lint/tox/include.mk
+++ b/makefiles/lint/tox/include.mk
@@ -20,7 +20,7 @@
 
 $(if $(DEBUG),$(warning ENTER))
 
-include $(ONF_MAKEDIR)/lint/tox/tox.mk
+include $(legacy-mk)/lint/tox/tox.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk b/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
index b618f6a..ad13c8e 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
@@ -20,7 +20,7 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
+include $(legacy-mk)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk b/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
index 575c299..76ceb1a 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
@@ -31,7 +31,7 @@
 ## Add requirement(s) for checking
 ## -------------------------------
 yamllint-cfg  := yamllint.helm
-yamllint-conf = $(wildcard $(yamllint-cfg) $(ONF_MAKEDIR)/lint/yaml/$(yamllint-cfg))
+yamllint-conf = $(wildcard $(yamllint-cfg) $(legacy-mk)/lint/yaml/$(yamllint-cfg))
 yamllint-args += $(addprefix --config-file$(space),$(yamllint-conf))
 yamllint-args += --strict
 
diff --git a/makefiles/lint/yaml/include.mk b/makefiles/lint/yaml/include.mk
index 2c9011c..62bfb30 100644
--- a/makefiles/lint/yaml/include.mk
+++ b/makefiles/lint/yaml/include.mk
@@ -22,16 +22,16 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-include $(ONF_MAKEDIR)/lint/yaml/help.mk
-include $(ONF_MAKEDIR)/lint/yaml/find_utils.mk
-include $(ONF_MAKEDIR)/lint/yaml/install.mk
+include $(legacy-mk)/lint/yaml/help.mk
+include $(legacy-mk)/lint/yaml/find_utils.mk
+include $(legacy-mk)/lint/yaml/install.mk
 
 # [TODO] Consolidate and refactor to support a simpler answer
 # Special snowflake linting requirements
--include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/include.mk
+-include $(legacy-mk)/lint/yaml/byrepo/$(--repo-name--)/include.mk
 
 # Standard lint-yaml targets
-include $(ONF_MAKEDIR)/lint/yaml/yamllint.mk
+include $(legacy-mk)/lint/yaml/yamllint.mk
 
 --onf-mk-lint-yaml-- := true#        # Flag to inhibit re-including
 
diff --git a/makefiles/python/include.mk b/makefiles/python/include.mk
index 20d248c..a858933 100644
--- a/makefiles/python/include.mk
+++ b/makefiles/python/include.mk
@@ -19,9 +19,9 @@
 # -----------------------------------------------------------------------
 
 ifdef PYTHON_FILES
-  include $(ONF_MAKEDIR)/python/test/include.mk
+  include $(legacy-mk)/python/test/include.mk
 else
-  include $(ONF_MAKEDIR)/python/test/include.mk
+  include $(legacy-mk)/python/test/include.mk
 endif
 
 # [EOF]
diff --git a/makefiles/targets/include.mk b/makefiles/targets/include.mk
index 2e534ea..7d2c99e 100644
--- a/makefiles/targets/include.mk
+++ b/makefiles/targets/include.mk
@@ -26,10 +26,10 @@
 ##-------------------##
 ##---]  TARGETS  [---##
 ##-------------------##
-include $(ONF_MAKEDIR)/targets/clean.mk
-include $(ONF_MAKEDIR)/targets/check.mk
-include $(ONF_MAKEDIR)/targets/sterile.mk
-include $(ONF_MAKEDIR)/targets/test/include.mk
+include $(legacy-mk)/targets/clean.mk
+include $(legacy-mk)/targets/check.mk
+include $(legacy-mk)/targets/sterile.mk
+include $(legacy-mk)/targets/test/include.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/makefiles/targets/test/include.mk b/makefiles/targets/test/include.mk
index 85b8648..30a7e38 100644
--- a/makefiles/targets/test/include.mk
+++ b/makefiles/targets/test/include.mk
@@ -24,7 +24,7 @@
 $(if $(DEBUG),$(warning ENTER))
 
 # Special snowflake: repository-dependent test target
--include $(ONF_MAKEDIR)/targets/test/$(--repo-name--).mk
+-include $(legacy-mk)/targets/test/$(--repo-name--).mk
 
 $(if $(DEBUG),$(warning LEAVE))