makefiles/
----------
o Adding more lint target logic.
o Copy in virtualenv.mk from voltha-docs to support dependency
based virtualenv installations.
*/*.yaml
--------
o Misc yamllint cleanups.
Makefile
--------
o Prune inlined logic since replaced by library makefile logic.
o Replaced explicit pyenv installation with dependency driven
so venv will only require installation once per target run.
o Library make clean/sterile targets handle cleanup.
Change-Id: Ie2ce0ebc01b07c0004a5904c2641c394e46d5044
diff --git a/makefiles/consts.mk b/makefiles/consts.mk
index fed358b..95d69a2 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
+# Copyright 2022 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,14 +13,32 @@
# 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 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
-null :=#
-space :=$(null) $(null)
-dot :=.
-HIDE ?=@
+$(if $(DEBUG),$(warning ENTER))
-# use bash for pusdh/popd and quick failures.
-export SHELL := bash -euo pipefail
+null :=#
+space := $(null) $(null)
+dot ?= .
+
+HIDE ?= @
+
+env-clean = /usr/bin/env --ignore-environment
+xargs-n1 := xargs -0 -t -n1 --no-run-if-empty
+
+## -----------------------------------------------------------------------
+## Not recommended but support (-u)ndef-less shell for pyenv activate
+## TODO: declare a pyenv shell
+## -----------------------------------------------------------------------
+have-shell-bash := $(filter bash,$(subst /,$(space),$(SHELL)))
+$(if $(have-shell-bash),$(null),\
+ $(eval export SHELL := /bin/bash -euo pipefail))
+
+shell-pyenv := bash -eo pipefail
+
+$(if $(DEBUG),$(warning LEAVE))
# [EOF]