[VOL-5054] - Triage build for voltha-openolt-adapter

cmd/*.go
internal/pkg/*.go
pkg/mocks/*.go
=================
  o Run gofmt -w -s on all non-(vendor/) golang sources (~make lint).
  o Release triage jobs have been failing on unrelated source problems.

config.mk
makefiles/docker/
makefiles/etc/
makefiles/targets/
makefiles/virtualenv.mk
=======================
  o https://github.com/opencord/onf-make.git
  o Copy in library makefiles, esp docker/include.mk

Makefile
========
  o Refactor and replace inline GO= and docker macros with docker/include.
  o Added manual flag LOCAL_FIX_PERMS=1 to grant docker image write access.
  o Target: mod-update
    - Split logic into targets mod-tidy and mod-vendor.
    - Display a banner when target runs for readability.
    - Target lint-mod now calls mod-update VS inlining make mod tidy & vendor
  o Target: test
    - Split logic into 3 distinct targets now that stdout/stderr handled.
    - Improve error handling, fail early VS accumulating status then exit
    - Display a banner when targets process for log readability.
    - Define macros for *.out and *.xml to avoid repeating logfile paths.

Change-Id: Ia2eb999f6176ce2eb46e41f55aee74c05b5a4cd2
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 5d9a2d9..f7bb20d 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 # -----------------------------------------------------------------------
-# Copyright 2017-2023 Open Networking Foundation
+# 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,19 +14,66 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# SPDX-FileCopyrightText: 2017-2023 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
 # -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.0
+# -----------------------------------------------------------------------
+
+ifndef mk-include--onf-make # single-include guard macor
 
 $(if $(DEBUG),$(warning ENTER))
 
-MAKEDIR ?= $(error MAKEDIR= is required)
+## -----------------------------------------------------------------------
+## Define vars based on relative import (normalize symlinks)
+## Usage: include makefiles/onf/include.mk
+## -----------------------------------------------------------------------
+onf-mk-abs    ?= $(abspath $(lastword $(MAKEFILE_LIST)))
+onf-mk-top    := $(subst /include.mk,$(null),$(onf-mk-abs))
+ONF_MAKEDIR   := $(onf-mk-top)
 
-include $(MAKEDIR)/consts.mk
-include $(MAKEDIR)/help.mk
-include $(MAKEDIR)/todo.mk
-include $(MAKEDIR)/lint/include.mk
+include $(ONF_MAKEDIR)/consts.mk
+include $(ONF_MAKEDIR)/help.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)/etc/commands.mk       # Tools and local installers
+
+include $(ONF_MAKEDIR)/virtualenv.mk#        # lint-{jjb,python} depends on venv
+# include $(ONF_MAKEDIR)/lint/include.mk
+# include $(ONF_MAKEDIR)/git-submodules.mk
+# include $(ONF_MAKEDIR)/gerrit/include.mk
+
+include $(ONF_MAKEDIR)/todo.mk
+# include $(ONF_MAKEDIR)/help/variables.mk
+
+##---------------------##
+##---]  ON_DEMAND  [---##
+##---------------------##
+$(if $(USE_DOCKER_MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
+
+##-------------------##
+##---]  TARGETS  [---##
+##-------------------##
+include $(ONF_MAKEDIR)/targets/clean.mk
+# include $(ONF_MAKEDIR)/targets/check.mk
+include $(ONF_MAKEDIR)/targets/sterile.mk
+# include $(ONF_MAKEDIR)/targets/test.mk
 
 $(if $(DEBUG),$(warning LEAVE))
 
+## --------------------------------------------------------------------------
+## structure to support pre/post target handling w/o inlining in Makefile (?)
+## --------------------------------------------------------------------------
+##   include makefiles/include.mk
+##     include makefiles/main/enter.mk
+##     [... include *.mk ...]
+##     include makefiles/main/leave.mk
+
+mk-include--onf-make := true
+
+endif # mk-include--onf-make
+
 # [EOF]