[VOL-5285] - JJB Upgrade toward v5
makefiles/include.mk
--------------------
o Define new lib var sandbox-root= pointing at the build directory.
o Added a comment section at the bottom to document declared vars.
makefiles/virtualenv/requirements-txt.mk
----------------------------------------
o Rework pip -r requirements.txt logic to be dependency driven.
o pip install will be run when requirements.txt is modified.
makefiles/virtualenv/include.mk
-------------------------------
o Populate venv-abs-path= with sandbox-root= to insulate against
$(PWD) path changes.
o Split logic into separate makefiles so include.mk remains small.
o Rework dependencies to leverage the new requirements-txt.mk logic.
Misc
----
o Rework help help-* targets to not display everything, all the time.
o make help : display venv (primary target).
o make venv-help : display exteneded help, venv targets and flags.
[HOWTO: test]
% git clone onf-make
% cd onf-make
% touch requirements.txt
% make help | grep venv
% make venv-help
% make venv
% make venv-requirements
% touch requirements.txt
% make venv-requirements
Change-Id: I9e12bc45c73a0e2bc90b1fd11c87ccffc7ebe57a
diff --git a/makefiles/virtualenv/version.mk b/makefiles/virtualenv/version.mk
new file mode 100644
index 0000000..e2f3af6
--- /dev/null
+++ b/makefiles/virtualenv/version.mk
@@ -0,0 +1,40 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 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.
+# 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: 2024 Open Networking Foundation Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+
+## ----------------------------------------------------------------------
+## Intent: Display installed python interpreter version
+## ----------------------------------------------------------------------
+.PHONY: venv-version
+venv-version :
+ $(activate) && python --version
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+venv-help ::
+ @printf ' %-33.33s %s\n' 'venv-version' \
+ 'Display installed python interpreter version'
+
+# [EOF]