VOL-4977 Failure in voltha-protos verification job.
Makefile
makefiles/consts.mk
makefiles/virtualenv.mk
-----------------------
o Update to use library makefile virtualenv.mk to create .venv
and remove by clean/sterile target.
o Construct commands using '&&' -vs- ';' to better detect errors.
o pip install packages relocated into the requirements.txt file.
o Separate extra deps from target rule since they are never
processed by the target rule.
o Added banners for readabilty.
makefiles/lint/golang/sca.mk
makefiles/lint/golang/include.mk
--------------------------------
o lint target for golang sources.
Tested with python v3.10 (localhost) and v2.7 (docker container).
Debug to see if hangs are dependent on the patch reported in vol-4977.
Change-Id: I0783f6fb347bf2cd15350f9e17fc19695343b7ac
diff --git a/Makefile b/Makefile
index 688a925..b8dae50 100755
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,15 @@
# Force pb file to be regenrated every time. Otherwise the make process assumes generated version is still valid
.PHONY: voltha.pb
+##----------------##
+##---] DEPS [---##
+##----------------##
+infra-deps := $(null)
+infra-deps += Makefile
+infra-deps += $(venv-activate-script)
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
print:
@echo "Proto files: $(PROTO_FILES)"
@echo "Python PB2 files: $(PROTO_PYTHON_PB2)"
@@ -94,8 +103,10 @@
sterile :: clean
$(RM) -r java_temp
-# Python targets
-python-protos: $(PROTO_PYTHON_PB2)
+## -----------------------------------------------------------------------
+## Python targets
+## -----------------------------------------------------------------------
+python-protos: $(infra-deps) $(PROTO_PYTHON_PB2)
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
@@ -255,7 +266,7 @@
java-protos-dirs += java_temp/src/main/java/org/opencord/voltha/adapter_service
mkdir-args += -vp
-# mkdir-args += --mode=0777
+# mkdir-args += --mode=0777# # Only a problem for local docker builds
java-protos: voltha.pb