[VOL-5222] - Upgrade golang version for VOLTHA jobs
Makefile
--------
o Remove redundant rm -fr java_temp commands, makefile target
java-clean is already setup to remove the temp directory.
o Add flag LOCAL_FIX_PERMS=1 to adjust permissions so make
build, test and lint can be used locally. Not perfect but close
(new files created from docker are still a problem).
makefiles/etc/include.mk
makefiles/etc/features.mk
------------------------
o Copy in banner functions from repo:onf-make.
makefiles/golang/commands.mk
makefiles/golang/include.mk
makefiles/golang/upgrade.mk
----------------------------
o Added target golang-version to display version from docker image.
o Added target golang-upgrade to update min version required by go.mod.
[HOWTO: Test]
-------------
o make help | grep golang
o make help-golang
o make golang-version
o make golang-upgrade # golang-version-upgrade=1.21.5
o make sterile build test LOCAL_FIX_PERMS=1
Change-Id: I4ffe0cd8785769d00d1b0a802fa49aebef3142f7
diff --git a/makefiles/etc/features.mk b/makefiles/etc/features.mk
new file mode 100644
index 0000000..b1bf482
--- /dev/null
+++ b/makefiles/etc/features.mk
@@ -0,0 +1,48 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2024 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-2024 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/etc/include.mk b/makefiles/etc/include.mk
index 541c1db..24ef929 100644
--- a/makefiles/etc/include.mk
+++ b/makefiles/etc/include.mk
@@ -14,7 +14,7 @@
# 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: 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
# Usage:
@@ -27,21 +27,10 @@
$(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)"
+##--------------------##
+##---] INCLUDES [---##
+##--------------------##
+include $(MAKEDIR)/etc/features.mk
$(if $(DEBUG),$(warning LEAVE))