Makefile improvements
.gitignore
----------
o Added .venv/ so git will ignore local python virtual env.
Makefile
--------
o Update copyright notice to latest syntax (w/SPDX tokens).
o Remove dup go-protos and java-protos as build target dependencies,
build depends on protos which depends on {build,go}-protos.
o Changed "python ./setup.py sdist" to "$(activate) && python ...",
difference: cmd[1] is system interpreter, cmd[2] is installed
virtualenv interpreter used by all other commands.
makefiles/help/include.mk
makefiles/help/go.mk
makefiles/help/java.mk
makefiles/help/python.mk
------------------------
o Help target formatting and cleanup.
o Not all language targets {go,java,python}-* were documented.
Change-Id: I752ec3f38ae28f868934f36460e5fd3f588bd810
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
diff --git a/Makefile b/Makefile
index 5cbd2b9..23b73c5 100755
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2019-2023 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2019-2024 Open Networking Foundation Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,9 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------
+# SPDX-FileCopyrightText: 2019-2024 Open Networking Foundation Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
.PHONY: test
-.DEFAULT_GOAL := test
+export .DEFAULT_GOAL := test
##-------------------##
##---] GLOBALS [---##
@@ -91,11 +94,16 @@
@echo "Go PB files: $(PROTO_GO_PB)"
@echo "JAVA PB files: $(PROTO_JAVA_PB)"
-# Generic targets
+## -----------------------------------------------------------------------
+## Generic targets
+## -----------------------------------------------------------------------
+.PHONY: protos
protos: python-protos go-protos java-protos
-build: protos python-build go-protos java-protos
+.PHONY: build
+build: protos python-build
+.PHONY: test
test: python-test go-test java-test
clean :: python-clean java-clean go-clean
@@ -144,7 +152,7 @@
$(call banner-enter,target $@)
$(RM) -r dist/
- python ./setup.py sdist
+ $(activate) && python ./setup.py sdist
$(call banner-leave,target $@)