VOL-4977 - Failure in voltha-protos verification job.
Makefile
--------
o This patch contains prototyping.
o Define DISTUTILS_DEBUG to enable verbose output from python pkg install.
o Define DOCKER_DEBUG to enable docker --debug.
o Added whitespace to improve make output readability.
o Insert banner text into targets so they will announce themselves for logging.
o Remove @/$(HIDE) from prototype generation so command will be visible.
makefiles/docker/include.mk
---------------------------
o Conditionally test for stdin and explicity pass --tty so docker can pass back log output.
.gitignore
----------
Ignore the virtualenv directory.
Change-Id: If73870fec03eadef2671f3f2f33075d58327914d
diff --git a/makefiles/docker/include.mk b/makefiles/docker/include.mk
index d78d008..3ed7d08 100644
--- a/makefiles/docker/include.mk
+++ b/makefiles/docker/include.mk
@@ -20,9 +20,18 @@
# tool containers
VOLTHA_TOOLS_VERSION ?= 2.4.0
-docker-run = docker run --rm --user $$(id -u):$$(id -g)# # Docker command stem
+docker-run := docker
+ifdef DOCKER_DEBUG
+ docker-run += --debug
+endif
+docker-run += run --rm --user $$(id -u):$$(id -g)# # Docker command stem
docker-run-app = $(docker-run) -v ${CURDIR}:/app# # w/filesystem mount
-is-stdin = $(shell test -t 0 && echo "-it")
+
+## GhostBusters: Cross the streams
+## Always pass -it to attach streams, jenkins + docker == test -t fail
+# is-stdin = $(shell test -t 0 && { echo "-it" } || {echo '--tty'})# # Attach streams if interactive
+is-stdin = $(shell test -t 0 && { echo '--interactive' })# # Attach streams if interactive
+is-stdin += --tty# # Attach stdout else jenkins::docker is silent
# Docker volume mounts: container:/app/release <=> localhost:{pwd}/release
vee-golang = -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg
diff --git a/makefiles/etc/include.mk b/makefiles/etc/include.mk
new file mode 100644
index 0000000..a48b42c
--- /dev/null
+++ b/makefiles/etc/include.mk
@@ -0,0 +1,48 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2023 Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+# Usage:
+#
+# mytarget:
+# $(call banner-enter,target $@)
+# @echo "Hello World"
+# $(call banner-leave,target $@)
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+target-banner = ** ---------------------------------------------------------------------------
+
+## -----------------------------------------------------------------------
+## Intent: Return a command line able to display a banner hilighting
+## make target processing within a logfile.
+## -----------------------------------------------------------------------
+banner-enter=\
+ @echo -e \
+ "\n"\
+ "$(target-banner)\n"\
+ "** $(MAKE) ENTER: $(1)\n"\
+ "$(target-banner)"\
+
+banner-leave=\
+ @echo -e "** $(MAKE) LEAVE: $(1)"
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 3cdbf2c..2ce93de 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -35,6 +35,7 @@
include $(MAKEDIR)/help/include.mk
include $(MAKEDIR)/consts.mk
+include $(MAKEDIR)/etc/include.mk
include $(MAKEDIR)/virtualenv.mk
include $(MAKEDIR)/help/variables.mk