Merge "[VOL-5194] - Update repo to use library makefiles."
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..b524402
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "makefiles/onf-lib"]
+	path = makefiles/onf-lib
+	url = https://github.com/opencord/onf-make.git
diff --git a/Makefile b/Makefile
index 99a5aeb..f99c809 100644
--- a/Makefile
+++ b/Makefile
@@ -26,8 +26,7 @@
 ##--------------------##
 ##---]  INCLUDES  [---##
 ##--------------------##
-include $(TOP)/config.mk#                # configure
-include $(TOP)/makefiles-orig/include.mk      # top level include
+include $(TOP)/makefiles/include.mk      # top level include
 
 # You can set these variables from the command line.
 SPHINXOPTS   ?=
@@ -89,7 +88,10 @@
 # coverage
 # linkcheck
 
+# -----------------------------------------------------------------------
 #  currently not enabled, should be added to lint target
+# [TODO] Create repo:onf-make/makefiles/lint/mdl
+# -----------------------------------------------------------------------
 LINT_STYLE ?= mdl_strict.rb
 md-lint: | $(OTHER_REPO_DOCS)
 	@echo "markdownlint(mdl) version: `mdl --version`"
diff --git a/howto/eof.rst b/howto/eof.rst
deleted file mode 100644
index 61c5d97..0000000
--- a/howto/eof.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-EOF
-===
diff --git a/howto/index.rst b/howto/index.rst
index 276a721..d52ba3c 100644
--- a/howto/index.rst
+++ b/howto/index.rst
@@ -12,4 +12,4 @@
 
    accounts
    development
-   eof
+   nop
diff --git a/howto/nop.rst b/howto/nop.rst
new file mode 100644
index 0000000..ef26f8c
--- /dev/null
+++ b/howto/nop.rst
@@ -0,0 +1,19 @@
+NOP
+===
+
+This file exists purely for side effects.
+
+howto/index.html reference prevents sphinx issuing TOC/not-in-table-of-contents warning.
+
+Modifying comments in this restructuredText(rst) file will force a job to
+run when a status of jenkins "No Builds Executed" is reported.
+
+A compile may not be needed but lint, syntax and license checking normally are.
+
+After "git commit --amend" has updated your patch.
+Visit gerrit and perform a recheck (:ref:`_pull-request-see-also`.)
+
+..
+   [comments: begin]
+   Thu Oct 19 09:22:59 AM EDT 2023
+
diff --git a/makefiles-orig/virtualenv.mk b/makefiles-orig/virtualenv.mk
index 775f56f..aa24172 100644
--- a/makefiles-orig/virtualenv.mk
+++ b/makefiles-orig/virtualenv.mk
@@ -84,13 +84,16 @@
 ## -----------------------------------------------------------------------
 ## -----------------------------------------------------------------------
 help ::
-	@echo
-	@echo '[VIRTUAL ENV]'
-	@echo '  venv                Create a python virtual environment'
+	@printf '\n[VIRTUAL ENV]\n'
+	@printf '  %-25.25s %s\n' 'venv' \
+  'Create a python virtual environment'
 	@echo '    venv-name=        Subdir name for virtualenv install'
-	@echo '  venv-activate-script         make macro name'
+	@printf '  %-25.25s %s\n' 'venv-activate-script' \
+  'venv make-once target dependency'
 	@echo '      $$(target) dependency    install python virtualenv'
 	@echo '      source $$(macro) && cmd  configure env and run cmd'
+	@printf '  %-25.25s %s\n' 'venv-activate-patched' \
+  'venv-activate-script patched for python v3.10+'
 
 $(if $(DEBUG),$(warning LEAVE))
 
diff --git a/config.mk b/makefiles/config.mk
similarity index 100%
rename from config.mk
rename to makefiles/config.mk
diff --git a/makefiles/include.mk b/makefiles/include.mk
new file mode 100644
index 0000000..44872b4
--- /dev/null
+++ b/makefiles/include.mk
@@ -0,0 +1,81 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2023 Open Networking Foundation (ONF) and the ONF 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: 2023 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.0
+# -----------------------------------------------------------------------
+# Setup:
+#   1) Makefile
+#      include config.mk
+#      include makefiles/include.mk
+#   2) cd makefiles
+#   23 copy makefiles_include_mk.ex into $repo/makefiles/include.mk
+#   4) make create-onf-lib
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+## -----------------------------------------------------------------------
+## Define vars based on relative import (normalize symlinks)
+## Usage: include makefiles/onf/include.mk
+## -----------------------------------------------------------------------
+onf-mk-abs    ?= $(abspath $(lastword $(MAKEFILE_LIST)))
+onf-mk-top    := $(subst makefiles/include.mk,$(null),$(onf-mk-abs))
+
+LEGACY := 1
+ifdef LEGACY
+  # Cleanup patch forthcoming
+  onf-mk-lib    := $(onf-mk-top)/makefiles-orig
+else
+  onf-mk-lib    := $(onf-mk-top)/makefiles/onf-lib/makefiles
+endif
+
+onf-mk-loc    := $(onf-mk-top)/makefiles/local
+TOP           ?= $(onf-mk-top)
+
+## ------------------------------------------------------
+## Two distinct vars needed to access library or project
+## ------------------------------------------------------
+ONF_MAKEDIR ?= $(onf-mk-lib)
+MAKEDIR     ?= $(onf-mk-loc)
+
+## -----------------------------------------------------------------------
+## Load makefiles in order:
+##   1) Library constants and logic loaded first
+##   2) Parameterize and augment targets from local (repo specific)
+## -----------------------------------------------------------------------
+include $(onf-mk-top)/makefiles/config.mk
+include $(onf-mk-lib)/include.mk
+include $(onf-mk-loc)/include.mk
+
+## -----------------------------------------
+## Submodue init target for new repositories
+## -----------------------------------------
+create-onf-lib : $(onf-mk-lib)
+$(onf-mk-lib):
+	mkdir -p $(dir $@)# makefiles
+	cd $(dir $@) \
+	    && git submodule https://github.com/opencord/onf-make.git onf-lib
+
+update-submodules:
+	git submodule foreach git pull
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/makefiles/local/include.mk b/makefiles/local/include.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/makefiles/local/include.mk
diff --git a/makefiles/onf-lib b/makefiles/onf-lib
new file mode 160000
index 0000000..0003f1a
--- /dev/null
+++ b/makefiles/onf-lib
@@ -0,0 +1 @@
+Subproject commit 0003f1a36b973973b5fc627363590d007d064cad