[VOL-5321] - Add repo:onf-make as a git submodule.
Makefile
lf/transition.mk
----------------
o Add bridge logic to conditionally load legacy makefiles or repo:onf-make.
o transition.mk allows logic to gradually be replaced.
o makefiles/ directory can eventually be removed after all
dependencies on local makefile logic have been removed.
makefiles/
----------
o Replace make var(s) ONF_MAKEDIR= and ONF_MAKE= with var legacy-mk=.
makefiles/commands/include.mk
makefiles/commands/kail/godownloader.sh
---------------------------------------
o Replace loading legacy kail logic with library makefiles.
o Git submodule scripts contain linting cleanup for scripts.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I152251039fc3b330ed1a6729922e465c53d00879
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..758cef6
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "lf/onf-make"]
+ path = lf/onf-make
+ url = https://github.com/opencord/onf-make.git
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 41f6167..420e5f7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,6 +3,10 @@
# -----------------------------------------------------------------------
# [NOTE] - Propogate .pre-commit-config.yaml edits to all repositories!
# -----------------------------------------------------------------------
+# [NOTE] - Common config file source lives in repo:onf-make
+# - https://gerrit.opencord.org/plugins/gitiles/
+# onf-make/+/refs/heads/master/.pre-commit-config.yaml
+# -----------------------------------------------------------------------
# [TODO]
# - pre-commit yaml config exists individually within repositories.
# - Generally lint config and benavior is consistent for all repos.
@@ -34,7 +38,7 @@
# .pre-commit-config-yaml 2024-04-19 v0.4
# -----------------------------------------------------------------------
-#ci:
+# ci:
# autofix_commit_msg: "Chore: pre-commit autoupdate"
## skip: [sync]
# skip:
@@ -45,7 +49,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
-# rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
@@ -55,10 +58,10 @@
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
-# - id: debug-statements
+ # - id: debug-statements
- id: end-of-file-fixer
- id: fix-encoding-pragma
-# - id: double-quote-string-fixer
+ # - id: double-quote-string-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=lf']
@@ -78,9 +81,9 @@
hooks:
- id: yamllint
-## -----------------------------------------------------------------------
-## [SOURCE] Documentation
-## -----------------------------------------------------------------------
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] Documentation
+ ## -----------------------------------------------------------------------
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.1
hooks:
@@ -90,61 +93,69 @@
rev: v0.13.0
hooks:
- id: markdownlint
-# - id: markdownlint_docker
+ # - id: markdownlint_docker
-## -----------------------------------------------------------------------
-## [SOURCE] Docker
-## -----------------------------------------------------------------------
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] Docker
+ ## -----------------------------------------------------------------------
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- - id: hadolint
-# - id: hadolint-docker
+ # - id: hadolint # local tool install
+ - id: hadolint-docker
-## -----------------------------------------------------------------------
-## [SOURCE] Golang
-## -----------------------------------------------------------------------
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] Golang
+ ## -----------------------------------------------------------------------
- repo: https://github.com/golangci/golangci-lint
rev: v1.41.1
hooks:
- id: golangci-lint
-## -----------------------------------------------------------------------
-## [SOURCE] REUSE License Checking
-## -----------------------------------------------------------------------
-# - repo: https://github.com/fsfe/reuse-tool
-# rev: v3.0.2
-# hooks:
-# - id: reuse
-# - id: add-license-headers
-#
-# - repo: https://github.com/ansys/pre-commit-hooks
-# rev: v0.2.9
-# hooks:
-# - id: add-license-headers
-# args:
-# - --custom_copyright=custom copyright phrase
-# - --custom_template=template_name
-# - --custom_license=license_name
-# - --ignore_license_check
-# - --start_year=2023
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] REUSE License Checking
+ ## -----------------------------------------------------------------------
+ # - repo: https://github.com/fsfe/reuse-tool
+ # rev: v3.0.2
+ # hooks:
+ # - id: reuse
+ # - id: add-license-headers
-## -----------------------------------------------------------------------
-## [SOURCE] Python
-## -----------------------------------------------------------------------
-# - repo: https://github.com/psf/black
-# rev: 22.10.0
-# hooks:
-# - id: black
+# - repo: https://github.com/ansys/pre-commit-hooks
+ # rev: v0.2.9
+ # hooks:
+ # - id: add-license-headers
+ # args:
+ # - --custom_copyright=custom copyright phrase
+ # - --custom_template=template_name
+ # - --custom_license=license_name
+ # - --ignore_license_check
+ # - --start_year=2023
+
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] Python
+ ## -----------------------------------------------------------------------
+ - repo: https://github.com/psf/black
+ rev: 22.10.0
+ hooks:
+ - id: black
# - repo: https://github.com/PyCQA/doc8
-# rev: v1.1.1
-# hooks:
-# - id: doc8
+ # rev: v1.1.1
+ # hooks:
+ # - id: doc8
-## -----------------------------------------------------------------------
-## [SOURCE] Testing
-## -----------------------------------------------------------------------
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] Spelling
+ ## -----------------------------------------------------------------------
+ - repo: https://github.com/codespell-project/codespell
+ rev: v2.2.4
+ hooks:
+ - id: codespell
+
+ ## -----------------------------------------------------------------------
+ ## [SOURCE] Testing
+ ## -----------------------------------------------------------------------
- repo: https://github.com/MarketSquare/robotframework-tidy
rev: 4.11.0
hooks:
@@ -155,15 +166,9 @@
# -------------------------------------------------------------------
exclude: |
(?x)^(
- ^jjb/.* |
^makefiles/.* |
^lf/.* |
^.venv/.* |
- ^jenkins-scripts/.* |
- ^lf-ansible/.* |
- ^packer/.* |
- ^test/.* |
- ^jjb/pipeline/voltha/voltha-physical-soak-dt-tests.groovy
)$
# [SEE ALSO]
diff --git a/Makefile b/Makefile
index 1e52fea..490f957 100644
--- a/Makefile
+++ b/Makefile
@@ -24,8 +24,18 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include config.mk
-include makefiles/include.mk
+$(if $(findstring disabled-joey,$(USER)),\
+ $(eval USE_LF_MK := 1)) # special snowflake
+
+##--------------------##
+##---] INCLUDES [---##
+##--------------------##
+ifdef USE_LF_MK
+ $(error should not be here)
+ include lf/include.mk
+else
+ include lf/transition.mk
+endif # ifdef USE_LF_MK
# Variables
VERSION ?= $(shell cat ./VERSION)
@@ -170,14 +180,14 @@
$(if $(LOCAL_FIX_PERMS),touch "$(go-result-out)")
$(if $(LOCAL_FIX_PERMS),chmod o+w "$(go-result-out)")
- # ------------------------------------------
+ # ------------------------------------------
# set -euo pipefail else tee masks $? return
# ------------------------------------------
@echo '** Running test coverage: exit-on-error is currently disabled'
-(\
set -euo pipefail; \
$(GO) test -mod=vendor -v -coverprofile "$(go-cover-out)" -covermode count ./... 2>&1 | tee "$(go-result-out)" \
- )
+ )
$(if $(LOCAL_FIX_PERMS),chmod o-w "$(go-result-out)")
$(if $(LOCAL_FIX_PERMS),chmod o-w "$(go-cover-out)")
@@ -255,4 +265,3 @@
@echo ' gen-coverage-cobertura Generate cobertura report'
# [EOF]
-
diff --git a/lf/README.md b/lf/README.md
new file mode 100644
index 0000000..9ffb383
--- /dev/null
+++ b/lf/README.md
@@ -0,0 +1,39 @@
+Library makefiles
+=================
+
+$(sandbox-root)/include.mk
+ Source this makefile to import all makefile logic.
+
+$(sandbox-root)/lf/onf-make/
+$(sandbox-root)/lf/onf-make/include.mk
+ repo:onf-make contains common library makefile logic.
+ tag based checkout (frozen) as a git submodule.
+
+$(sandbox-root)/lf/local/
+$(sandbox-root)/lf/local/include.mk
+ per-repository targets and logic to customize makefile behavior.
+
+<!--
+
+# -----------------------------------------------------------------------
+# 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
+# -----------------------------------------------------------------------
+# Intent:
+# -----------------------------------------------------------------------
+
+-->
diff --git a/config.mk b/lf/config.mk
similarity index 98%
rename from config.mk
rename to lf/config.mk
index 4303390..18b7145 100644
--- a/config.mk
+++ b/lf/config.mk
@@ -70,6 +70,7 @@
##---] Filesystem exclusions [---##
##---------------------------------##
onf-excl-dirs := $(null) # make clean: dirs=
+onf-excl-dirs += lf# # git submodule
onf-excl-dirs += .venv# # $(venv-name)
onf-excl-dirs += vendor# # golang / voltha*-go
onf-excl-dirs += patches# # voltha docs - python upgrade
diff --git a/lf/include.mk b/lf/include.mk
new file mode 100644
index 0000000..5d52907
--- /dev/null
+++ b/lf/include.mk
@@ -0,0 +1,109 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2023-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: 2023-2024 Open Networking Foundation Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+## -----------------------------------------------------------------------
+## Infer path to cloned sandbox root
+## [TODO] Deprecate TOP=
+## -----------------------------------------------------------------------
+lf-sbx-root := $(abspath $(lastword $(MAKEFILE_LIST)))
+lf-sbx-root := $(subst /lf/include.mk,$(null),$(lf-sbx-root))
+
+## -----------------------------------------------------------------------
+## 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 /include.mk,$(null),$(onf-mk-abs))
+onf-mk-lib := $(onf-mk-top)/onf-make/makefiles
+onf-mk-loc := $(onf-mk-top)/local
+
+TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs))
+
+## -----------------------------------------------------------------------
+## This variable is a bridge to help transition away from legacy makefiles.
+## -----------------------------------------------------------------------
+legacy-mk := $(lf-sbx-root)/makefiles
+
+## ------------------------------------------------------
+## Two distinct vars needed to access library or project
+## ------------------------------------------------------
+ONF_MAKEDIR ?= $(onf-mk-lib)
+MAKEDIR ?= $(onf-mk-loc)
+
+# -----------------------------------------------------------------------
+# Load per-repository conditionals
+# Load late else alter MAKEFILE_LIST
+# NOTE: config.mk can be removed if dynamic feature detection by
+# file extension is added.
+# -----------------------------------------------------------------------
+include $(wildcard $(lf-sbx-root)/config.mk $(lf-sbx-root)/lf/config.mk)
+
+## -----------------------------------------------------------------------
+## Load makefiles in order:
+## 1) Library constants and logic loaded first
+## 2) Parameterize and augment targets from local (repo specific)
+## -----------------------------------------------------------------------
+include $(onf-mk-lib)/include.mk
+include $(onf-mk-loc)/include.mk
+
+## Define late so caller (?- env --ignore-environment -?)
+GIT ?= /usr/bin/env git
+
+## -----------------------------------------------------------------------
+## Intent: This target will update dependent git-submodule to the latest
+## version available from the remote repository. Subsequently
+## a checkin will be needed to make the submodule update permanent.
+## -----------------------------------------------------------------------
+.PHONY: update-git-submodules
+update-git-submodules:
+ $(GIT) submodule foreach git pull
+
+## -----------------------------------------------------------------------
+## Intent: On-demand cloning of git submodule(s).
+## -----------------------------------------------------------------------
+## Trigger: include $(onf-mk-lib)/include.mk
+## - When the make command attempts to include a makefile from the
+## repo:onf-make submodule, this target/dependency will initialize
+## and checkout all submodules the current repository depends on.
+## -----------------------------------------------------------------------
+.PHONY: git-submodules
+git-submodules : $(onf-mk-lib)/include.mk
+
+$(onf-mk-lib)/include.mk:
+
+ $(call banner-enter,(Checkout git submodules))
+
+ $(GIT) submodule update --init --recursive
+
+ $(call banner-leave,(Checkout git submodules))
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+help-git :
+ @printf ' %-33.33s %s\n' 'git-submodules' \
+ 'Init and recursive checkout of git submodule(s)'
+ @printf ' %-33.33s %s\n' 'update-git-submodules' \
+ 'Update git submodule(s) to the latest version'
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/lf/local/include.mk b/lf/local/include.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lf/local/include.mk
diff --git a/lf/onf-make b/lf/onf-make
new file mode 160000
index 0000000..78fca2d
--- /dev/null
+++ b/lf/onf-make
@@ -0,0 +1 @@
+Subproject commit 78fca2dfde43820c5b0449e6ec00be7547acf4d6
diff --git a/lf/transition.mk b/lf/transition.mk
new file mode 100644
index 0000000..ea4e845
--- /dev/null
+++ b/lf/transition.mk
@@ -0,0 +1,62 @@
+# -*- 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 [---##
+##-------------------##
+lf-sbx-root := $(abspath $(lastword $(MAKEFILE_LIST)))
+lf-sbx-root := $(subst /lf/transition.mk,$(null),$(lf-sbx-root))
+
+legacy-mk ?= $(lf-sbx-root)/makefiles
+onf-mk-dir ?= $(lf-sbx-root)/lf/onf-make/makefiles
+
+sandbox-root := $(lf-sbx-root)
+
+# set default shell options
+SHELL = bash -e -o pipefail
+
+# dependency of virtualenv::sterile
+clean ::
+
+##--------------------##
+##---] INCLUDES [---##
+##--------------------##
+include $(lf-sbx-root)/lf/config.mk
+include $(legacy-mk)/include.mk
+
+# [EOF]
+
+ifdef paste-into-repository-makefile
+
+$(if $(findstring disabled-joey,$(USER)),\
+ $(eval USE_LF_MK := 1)) # special snowflake
+
+##--------------------##
+##---] INCLUDES [---##
+##--------------------##
+ifdef USE_LF_MK
+ include lf/include.mk
+else
+ include lf/transition.mk
+endif # ifdef USE_LF_MK
+
+endif # paste-into-repository-makefile
diff --git a/makefiles/commands/include.mk b/makefiles/commands/include.mk
index 1df1085..f64574a 100644
--- a/makefiles/commands/include.mk
+++ b/makefiles/commands/include.mk
@@ -25,7 +25,7 @@
$(if $(DEBUG),$(warning ENTER))
-include $(ONF_MAKEDIR)/commands/kail.mk
+include $(legacy-mk)/commands/kail.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/commands/kail/godownloader.sh b/makefiles/commands/kail/godownloader.sh
index 77ad5bf..63354bb 100755
--- a/makefiles/commands/kail/godownloader.sh
+++ b/makefiles/commands/kail/godownloader.sh
@@ -1,8 +1,25 @@
#!/bin/sh
-set -e
+# -----------------------------------------------------------------------
+# SPDX-License-Identifier: LicenseRef-MIT
+# SPDX-FileCopyrightText: Copyright (c) 2017-2019 Nick Galbreath
+# -----------------------------------------------------------------------
# Code generated by godownloader on 2019-05-28T19:49:53Z. DO NOT EDIT.
# Copyright 2019 - (disable makefiles/lint/license.mk)
-#
+# -----------------------------------------------------------------------
+# Intent:
+# https://pkg.go.dev/github.com/golangci/godownloader
+# https://github.com/boz/kail/blob/v0.15.1/godownloader.sh
+# https://github.com/golangci/godownloader/blob/8788aabdf9391ad712052a4185e8047f8c2fcac5/LICENSE.md
+# -----------------------------------------------------------------------
+# Background:
+# o The project has been deendent on godwnloader.sh to install kail.
+# o godownloader.sh was deprecated, replaced by goreleaser.
+# o A static of the script was checked in, exactly what is needed.
+# o godownloader has been forked, use download if released and persistent:
+# https://github.com/kamilsk/godownloader
+# -----------------------------------------------------------------------
+
+set -e
usage() {
this=$1
@@ -39,6 +56,7 @@
shift $((OPTIND - 1))
TAG=$1
}
+
# this function wraps all the destructive operations
# if a curl|bash cuts off the end of the script due to
# network, either nothing will happen or will syntax error
@@ -122,16 +140,20 @@
but credit (and pull requests) appreciated.
------------------------------------------------------------------------
EOF
+
is_command() {
command -v "$1" >/dev/null
}
echoerr() {
echo "$@" 1>&2
}
+
log_prefix() {
+ # shellcheck disable=SC2317
echo "$0"
}
_logp=6
+
log_set_priority() {
_logp="$1"
}
@@ -190,7 +212,7 @@
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
esac
- echo ${arch}
+ echo "${arch}"
}
uname_os_check() {
os=$(uname_os)
diff --git a/makefiles/docker/include.mk b/makefiles/docker/include.mk
index ee27e10..5325305 100644
--- a/makefiles/docker/include.mk
+++ b/makefiles/docker/include.mk
@@ -18,7 +18,7 @@
$(if $(DEBUG),$(warning ENTER))
# Per-repository
-include $(ONF_MAKEDIR)/docker/config/$(--repo-name--).mk
+include $(legacy-mk)/docker/config/$(--repo-name--).mk
# ------------------- ##
# ---] GLOBALS [--- ##
diff --git a/makefiles/gerrit/include.mk b/makefiles/gerrit/include.mk
index 1c5ad2c..4227229 100644
--- a/makefiles/gerrit/include.mk
+++ b/makefiles/gerrit/include.mk
@@ -18,7 +18,7 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/gerrit/help.mk
+include $(legacy-mk)/gerrit/help.mk
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
diff --git a/makefiles/git/include.mk b/makefiles/git/include.mk
index 68525dc..be8b80e 100644
--- a/makefiles/git/include.mk
+++ b/makefiles/git/include.mk
@@ -29,14 +29,14 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/git/help.mk
-include $(ONF_MAKEDIR)/git/required.mk
+include $(legacy-mk)/git/help.mk
+include $(legacy-mk)/git/required.mk
## Special snowflake: per-repository logic loader
--include $(ONF_MAKEDIR)/git/byrepo/$(--repo-name--).mk
+-include $(legacy-mk)/git/byrepo/$(--repo-name--).mk
# Dynamic loading when targets are requested by name
-include $(ONF_MAKEDIR)/git/submodules.mk
+include $(legacy-mk)/git/submodules.mk
endif # --onf-make-git--
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 012d505..79c2aaf 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -35,34 +35,34 @@
TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs))
-include $(ONF_MAKEDIR)/consts.mk
-include $(ONF_MAKEDIR)/help/include.mk # render target help
-include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
-include $(ONF_MAKEDIR)/etc/include.mk # banner macros
-include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers
+include $(legacy-mk)/consts.mk
+include $(legacy-mk)/help/include.mk # render target help
+include $(legacy-mk)/utils/include.mk # dependency-less helper macros
+include $(legacy-mk)/etc/include.mk # banner macros
+include $(legacy-mk)/commands/include.mk # Tools and local installers
-include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
-include $(ONF_MAKEDIR)/lint/include.mk
+include $(legacy-mk)/virtualenv.mk# # lint-{jjb,python} depends on venv
+include $(legacy-mk)/lint/include.mk
-include $(ONF_MAKEDIR)/gerrit/include.mk
-include $(ONF_MAKEDIR)/git/include.mk
-include $(ONF_MAKEDIR)/jjb/include.mk
+include $(legacy-mk)/gerrit/include.mk
+include $(legacy-mk)/git/include.mk
+include $(legacy-mk)/jjb/include.mk
-# include $(ONF_MAKEDIR)/release/include.mk
+# include $(legacy-mk)/release/include.mk
-include $(ONF_MAKEDIR)/todo.mk
-include $(ONF_MAKEDIR)/help/variables.mk
+include $(legacy-mk)/todo.mk
+include $(legacy-mk)/help/variables.mk
##---------------------##
##---] ON_DEMAND [---##
##---------------------##
-$(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk))
-$(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
+$(if $(USE-ONF-GERRIT-MK),$(eval include $(legacy-mk)/gerrit/include.mk))
+$(if $(USE-ONF-DOCKER-MK),$(eval include $(legacy-mk)/docker/include.mk))
##-------------------##
##---] TARGETS [---##
##-------------------##
-include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile, tox
+include $(legacy-mk)/targets/include.mk # clean, sterile, tox
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/jjb/include.mk b/makefiles/jjb/include.mk
index 7af018c..ebf2104 100644
--- a/makefiles/jjb/include.mk
+++ b/makefiles/jjb/include.mk
@@ -23,12 +23,12 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/jjb/help.mk
-include $(ONF_MAKEDIR)/jjb/required.mk
+include $(legacy-mk)/jjb/help.mk
+include $(legacy-mk)/jjb/required.mk
ifdef USE-ONF-JJB-MK
# Dynamic loading when targets are requested by name
- include $(ONF_MAKEDIR)/jjb/targets.mk
+ include $(legacy-mk)/jjb/targets.mk
endif
# [EOF]
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index 2102fc9..f21af76 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -36,17 +36,17 @@
# NO-LINT-PYLINT := true
# endif
-include $(ONF_MAKEDIR)/lint/groovy.mk
-include $(ONF_MAKEDIR)/lint/jjb.mk
-include $(ONF_MAKEDIR)/lint/json.mk
-include $(ONF_MAKEDIR)/lint/license/include.mk
-include $(ONF_MAKEDIR)/lint/makefile.mk
-include $(ONF_MAKEDIR)/lint/python/include.mk
-include $(ONF_MAKEDIR)/lint/shellcheck/include.mk
-include $(ONF_MAKEDIR)/lint/tox/include.mk
-include $(ONF_MAKEDIR)/lint/yaml/include.mk
+include $(legacy-mk)/lint/groovy.mk
+include $(legacy-mk)/lint/jjb.mk
+include $(legacy-mk)/lint/json.mk
+include $(legacy-mk)/lint/license/include.mk
+include $(legacy-mk)/lint/makefile.mk
+include $(legacy-mk)/lint/python/include.mk
+include $(legacy-mk)/lint/shellcheck/include.mk
+include $(legacy-mk)/lint/tox/include.mk
+include $(legacy-mk)/lint/yaml/include.mk
-include $(ONF_MAKEDIR)/lint/help.mk
+include $(legacy-mk)/lint/help.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/include.mk.bk b/makefiles/lint/include.mk.bk
index dbc2e8b..709c32a 100644
--- a/makefiles/lint/include.mk.bk
+++ b/makefiles/lint/include.mk.bk
@@ -9,14 +9,14 @@
@echo
@echo "[LINT]"
-include $(ONF_MAKE)/lint/makefile.mk
-include $(ONF_MAKE)/lint/python.mk
-include $(ONF_MAKE)/lint/shell.mk
+include $(legacy-mk)/lint/makefile.mk
+include $(legacy-mk)/lint/python.mk
+include $(legacy-mk)/lint/shell.mk
ifdef YAML_FILES
- include $(ONF_MAKE)/lint/yaml/python.mk
+ include $(legacy-mk)/lint/yaml/python.mk
else
- include $(ONF_MAKE)/lint/yaml/yamllint.mk
+ include $(legacy-mk)/lint/yaml/yamllint.mk
endif
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/python/include.mk b/makefiles/lint/python/include.mk
index 29b4e84..5944bbf 100644
--- a/makefiles/lint/python/include.mk
+++ b/makefiles/lint/python/include.mk
@@ -22,9 +22,9 @@
##-------------------##
$(if $(UNSTABLE),$(eval lint-python-all := true))
-include $(ONF_MAKEDIR)/lint/python/find_utils.mk
-include $(ONF_MAKEDIR)/lint/python/flake8.mk
-include $(ONF_MAKEDIR)/lint/python/pylint.mk
+include $(legacy-mk)/lint/python/find_utils.mk
+include $(legacy-mk)/lint/python/flake8.mk
+include $(legacy-mk)/lint/python/pylint.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/shellcheck/include.mk b/makefiles/lint/shellcheck/include.mk
index 329ce8d..5d7309b 100644
--- a/makefiles/lint/shellcheck/include.mk
+++ b/makefiles/lint/shellcheck/include.mk
@@ -22,11 +22,11 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-# include $(ONF_MAKEDIR)/lint/shellcheck/help.mk
-include $(ONF_MAKEDIR)/lint/shellcheck/find_utils.mk
+# include $(legacy-mk)/lint/shellcheck/help.mk
+include $(legacy-mk)/lint/shellcheck/find_utils.mk
# Standard lint-yaml targets
-include $(ONF_MAKEDIR)/lint/shellcheck/shellcheck.mk
+include $(legacy-mk)/lint/shellcheck/shellcheck.mk
mk-include--onf-lint-shellcheck := true# # Flag to inhibit re-including
diff --git a/makefiles/lint/tox/include.mk b/makefiles/lint/tox/include.mk
index 29dfc8c..ba10793 100644
--- a/makefiles/lint/tox/include.mk
+++ b/makefiles/lint/tox/include.mk
@@ -20,7 +20,7 @@
$(if $(DEBUG),$(warning ENTER))
-include $(ONF_MAKEDIR)/lint/tox/tox.mk
+include $(legacy-mk)/lint/tox/tox.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk b/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
index b618f6a..ad13c8e 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
@@ -20,7 +20,7 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
+include $(legacy-mk)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk b/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
index 575c299..76ceb1a 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
@@ -31,7 +31,7 @@
## Add requirement(s) for checking
## -------------------------------
yamllint-cfg := yamllint.helm
-yamllint-conf = $(wildcard $(yamllint-cfg) $(ONF_MAKEDIR)/lint/yaml/$(yamllint-cfg))
+yamllint-conf = $(wildcard $(yamllint-cfg) $(legacy-mk)/lint/yaml/$(yamllint-cfg))
yamllint-args += $(addprefix --config-file$(space),$(yamllint-conf))
yamllint-args += --strict
diff --git a/makefiles/lint/yaml/include.mk b/makefiles/lint/yaml/include.mk
index 2c9011c..62bfb30 100644
--- a/makefiles/lint/yaml/include.mk
+++ b/makefiles/lint/yaml/include.mk
@@ -22,16 +22,16 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/yaml/help.mk
-include $(ONF_MAKEDIR)/lint/yaml/find_utils.mk
-include $(ONF_MAKEDIR)/lint/yaml/install.mk
+include $(legacy-mk)/lint/yaml/help.mk
+include $(legacy-mk)/lint/yaml/find_utils.mk
+include $(legacy-mk)/lint/yaml/install.mk
# [TODO] Consolidate and refactor to support a simpler answer
# Special snowflake linting requirements
--include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/include.mk
+-include $(legacy-mk)/lint/yaml/byrepo/$(--repo-name--)/include.mk
# Standard lint-yaml targets
-include $(ONF_MAKEDIR)/lint/yaml/yamllint.mk
+include $(legacy-mk)/lint/yaml/yamllint.mk
--onf-mk-lint-yaml-- := true# # Flag to inhibit re-including
diff --git a/makefiles/python/include.mk b/makefiles/python/include.mk
index 20d248c..a858933 100644
--- a/makefiles/python/include.mk
+++ b/makefiles/python/include.mk
@@ -19,9 +19,9 @@
# -----------------------------------------------------------------------
ifdef PYTHON_FILES
- include $(ONF_MAKEDIR)/python/test/include.mk
+ include $(legacy-mk)/python/test/include.mk
else
- include $(ONF_MAKEDIR)/python/test/include.mk
+ include $(legacy-mk)/python/test/include.mk
endif
# [EOF]
diff --git a/makefiles/targets/include.mk b/makefiles/targets/include.mk
index 2e534ea..7d2c99e 100644
--- a/makefiles/targets/include.mk
+++ b/makefiles/targets/include.mk
@@ -26,10 +26,10 @@
##-------------------##
##---] TARGETS [---##
##-------------------##
-include $(ONF_MAKEDIR)/targets/clean.mk
-include $(ONF_MAKEDIR)/targets/check.mk
-include $(ONF_MAKEDIR)/targets/sterile.mk
-include $(ONF_MAKEDIR)/targets/test/include.mk
+include $(legacy-mk)/targets/clean.mk
+include $(legacy-mk)/targets/check.mk
+include $(legacy-mk)/targets/sterile.mk
+include $(legacy-mk)/targets/test/include.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/targets/test/include.mk b/makefiles/targets/test/include.mk
index 85b8648..30a7e38 100644
--- a/makefiles/targets/test/include.mk
+++ b/makefiles/targets/test/include.mk
@@ -24,7 +24,7 @@
$(if $(DEBUG),$(warning ENTER))
# Special snowflake: repository-dependent test target
--include $(ONF_MAKEDIR)/targets/test/$(--repo-name--).mk
+-include $(legacy-mk)/targets/test/$(--repo-name--).mk
$(if $(DEBUG),$(warning LEAVE))