[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/consts.mk b/makefiles/consts.mk
index f61d341..8961b3a 100644
--- a/makefiles/consts.mk
+++ b/makefiles/consts.mk
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 # -----------------------------------------------------------------------
-# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors (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,18 +14,50 @@
 # 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
 # -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.0
+# -----------------------------------------------------------------------
 
-null        :=#
-space       := $(null) $(null)
-dot         ?= .
+$(if $(DEBUG),$(warning ENTER))
 
-HIDE        ?= @
-SHELL       := bash -e -o pipefail
+# include makefiles/constants.mk
+export dot          :=.
+export null         :=#
+export space        := $(null) $(null)
+export quote-single := $(null)'$(null)#'
+export quote-double := $(null)"$(null)#"
 
-env-clean   = /usr/bin/env --ignore-environment
+# [DEBUG] make {target} HIDE=
+HIDE           ?= @
 
+env-clean      ?= /usr/bin/env --ignore-environment
+xargs-n1       := xargs -0 -t -n1 --no-run-if-empty
+xargs-n1-clean := $(env-clean) $(xargs-n1)
+
+## -----------------------------------------------------------------------
+## Intent: NOP command for targets whose dependencies do all heavy lifting
+## -----------------------------------------------------------------------
+## usage: foo bar tans
+## <tab>$(nop-command)
+## -----------------------------------------------------------------------
+nop-cmd        := :
+
+## -----------------------------------------------------------------------
+## Default shell:
+##   o set -e            enable error checking
+##   o set -u            report undefined errors
+##   o set -o pipefail   propogate shell pipeline failures.
+## -----------------------------------------------------------------------
+SHELL ?= /bin/bash
+have-shell-bash := $(filter bash,$(subst /,$(space),$(SHELL)))
+$(if $(have-shell-bash),$(null),\
+  $(eval export SHELL := bash -euo pipefail))
+
+export SHELL ?= bash -euo pipefail
+
+$(if $(DEBUG),$(warning LEAVE))
 
 # [EOF]