[VOL-5308] - bbsim test failure
Makefile
--------
o Temporary flag USE_LF_MK=1 added to enable library repo:onf-make use.
o Default behavior will use legacy makefiles from repo:bbsim/makefiles/.
o Fixed typo on line 76
lf/include.mk
makefiles/
-------------
o Transition bridge for using repo:onf-make.
o Define variable legacy-mk= as bbsim/makefiles/
o Replace path variable $(MAKEDIR=) with $(legacy-mk).
o Replace variable $(ONF_MAKEDIR=) with $(legacy-mk).
o These edits help break dependency on non-library makefiles/ directory.
allowing repo:onf-make to be used as a transparent replacement.
Change-Id: Ida8c020384cf78ddf19fa6375702429d992d10a1
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
diff --git a/makefiles/commands/include.mk b/makefiles/commands/include.mk
index e2d3ccd..0a2d46d 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/golang/include.mk b/makefiles/golang/include.mk
index 7ce9b66..53fe57b 100644
--- a/makefiles/golang/include.mk
+++ b/makefiles/golang/include.mk
@@ -21,6 +21,6 @@
# ONF.makefiles.include.version = 1.1
# -----------------------------------------------------------------------
-include $(ONF_MAKEDIR)/golang/mod-update.mk
+include $(legacy-mk)/golang/mod-update.mk
# [EOF]
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 4cd3055..247df88 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -26,38 +26,35 @@
## -----------------------------------------------------------------------
onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST)))
onf-mk-top := $(subst /include.mk,$(null),$(onf-mk-abs))
-ONF_MAKEDIR := $(onf-mk-top)
-MAKEDIR ?= $(ONF_MAKEDIR)# # Two dirs needed, local and common
+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 $(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 $(legacy-mk)/virtualenv.mk# # lint-{jjb,python} depends on venv
-include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
+include $(legacy-mk)/lint/include.mk
-include $(ONF_MAKEDIR)/lint/include.mk
+# include $(legacy-mk)/git-submodules.mk
+# include $(legacy-mk)/gerrit/include.mk
+include $(legacy-mk)/golang/include.mk
-# include $(ONF_MAKEDIR)/git-submodules.mk
-# include $(ONF_MAKEDIR)/gerrit/include.mk
-include $(ONF_MAKEDIR)/golang/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_DOCKER_MK),$(eval $(ONF_MAKEDIR)/docker/include.mk))
+$(if $(USE_DOCKER_MK),$(eval $(legacy-mk)/docker/include.mk))
##-------------------##
##---] TARGETS [---##
##-------------------##
-include $(ONF_MAKEDIR)/targets/clean.mk
-# include $(ONF_MAKEDIR)/targets/check.mk
-include $(ONF_MAKEDIR)/targets/sterile.mk
-# include $(ONF_MAKEDIR)/targets/test.mk
+include $(legacy-mk)/targets/clean.mk
+# include $(legacy-mk)/targets/check.mk
+include $(legacy-mk)/targets/sterile.mk
+# include $(legacy-mk)/targets/test.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/doc8/excl.mk b/makefiles/lint/doc8/excl.mk
index 930d5f9..cc68ab0 100644
--- a/makefiles/lint/doc8/excl.mk
+++ b/makefiles/lint/doc8/excl.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2017-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,26 +14,45 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------
+# SPDX-FileCopyrightText: 2017-2024 Open Networking Foundation Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+# Intent: This makefile maintains file and directory exclusion lists
+# for doc8 linting.
+# -----------------------------------------------------------------------
$(if $(DEBUG),$(warning ENTER))
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-## excl := $(wildcar */*/.git)
+lint-doc8-excl-raw += '*/.git'
lint-doc8-excl-raw += '$(venv-name)'
lint-doc8-excl-raw += '*/$(venv-name)'
+lint-doc8-excl-raw += './lf/onf-make'
+lint-doc8-excl-raw += 'LICENSES/'
+
+# Should we filter generated content as redundant ?
+# Considering _build will be published and consumed.
$(if $(BUILDDIR),\
$(excl lint-doc8-excl-raw += '$(BUILDDIR)'))
+# -----------------------------------------------------------------------
# YUCK! -- overhead
# o Submodule(s) use individual/variant virtualenv install paths.
# o Exclude special snowflakes to enable library makefile use.
# o All can use virtualenv.mk for consistent names and cleanup
# o [TODO] Ignore submodules, individual repos should check their sources.
+# -----------------------------------------------------------------------
+lint-doc8-excl-raw += '*/venv_*'# # '*/venv_cord'
+lint-doc8-excl-raw += '*/*_venv'# # '*/vst_venv'
-lint-doc8-excl-raw += '*/venv_cord'
-
+## -----------------------------------------------------------------------
+## repo:voltha-docs exclusions
+## Migrate into one of:
+## makefiles/local/lint/doc8/doc8.ini
+## makefiles/local/lint/doc8/excl.mk
+## -----------------------------------------------------------------------
lint-doc8-excl-raw += './cord-tester'
lint-doc8-excl-raw += './repos/cord-tester'
diff --git a/makefiles/lint/doc8/include.mk b/makefiles/lint/doc8/include.mk
index 272479f..affed5f 100644
--- a/makefiles/lint/doc8/include.mk
+++ b/makefiles/lint/doc8/include.mk
@@ -36,7 +36,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-include $(MAKEDIR)/lint/doc8/excl.mk
+include $(legacy-mk)/lint/doc8/excl.mk
ifdef lint-doc8-excl
lint-doc8-excl-args += $(addprefix --ignore-path$(space),$(lint-doc8-excl))
diff --git a/makefiles/lint/docker/include.mk b/makefiles/lint/docker/include.mk
index 7fafeb2..33cb000 100644
--- a/makefiles/lint/docker/include.mk
+++ b/makefiles/lint/docker/include.mk
@@ -21,6 +21,6 @@
@echo " lint Static code analysis/syntax checking"
@echo " LOCAL_LINT=1 Enable local linting w/o docker & jenkins overhead"
-include $(MAKEDIR)/lint/docker/hadolint.mk
+include $(legacy-mk)/lint/docker/hadolint.mk
# [EOF]
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index f558d64..c89a12e 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -12,18 +12,18 @@
@echo
@echo "[LINT]"
-include $(ONF_MAKEDIR)/lint/doc8/include.mk
-include $(ONF_MAKEDIR)/lint/docker/include.mk
-include $(ONF_MAKEDIR)/lint/groovy/include.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/shell.mk
-include $(ONF_MAKEDIR)/lint/yaml.mk
+include $(legacy-mk)/lint/doc8/include.mk
+include $(legacy-mk)/lint/docker/include.mk
+include $(legacy-mk)/lint/groovy/include.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/shell.mk
+include $(legacy-mk)/lint/yaml.mk
-include $(ONF_MAKEDIR)/lint/help.mk
+include $(legacy-mk)/lint/help.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/include.mk.safe b/makefiles/lint/include.mk.safe
deleted file mode 100644
index 9b454fd..0000000
--- a/makefiles/lint/include.mk.safe
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2017-2024 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.
-# -----------------------------------------------------------------------
-
-$(if $(DEBUG),$(warning ENTER))
-
-help ::
- @echo
- @echo "[LINT]"
-
-include $(ONF_MAKEDIR)/lint/doc8/include.mk
-include $(ONF_MAKEDIR)/lint/docker/include.mk
-# include $(ONF_MAKEDIR)/lint/groovy/include.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/shell.mk
-# include $(ONF_MAKEDIR)/lint/yaml.mk
-
-include $(ONF_MAKEDIR)/lint/help.mk
-
-$(if $(DEBUG),$(warning LEAVE))
-
-# [EOF]
diff --git a/makefiles/lint/license/include.mk b/makefiles/lint/license/include.mk
index b9cd06e..96e62a5 100644
--- a/makefiles/lint/license/include.mk
+++ b/makefiles/lint/license/include.mk
@@ -22,8 +22,8 @@
$(if $(DEBUG),$(warning ENTER))
$(if $(USE_LINT_LICENSE)\
- ,$(eval include $(ONF_MAKEDIR)/lint/license/voltha-system-tests/include.mk)\
- ,$(eval include $(ONF_MAKEDIR)/lint/license/common.mk)\
+ ,$(eval include $(legacy-mk)/lint/license/voltha-system-tests/include.mk)\
+ ,$(eval include $(legacy-mk)/lint/license/common.mk)\
)
mk-include--onf-lint-license := true
diff --git a/makefiles/lint/license/voltha-system-tests/include.mk b/makefiles/lint/license/voltha-system-tests/include.mk
index ade7c0a..fa6c83a 100644
--- a/makefiles/lint/license/voltha-system-tests/include.mk
+++ b/makefiles/lint/license/voltha-system-tests/include.mk
@@ -69,7 +69,7 @@
## Jenkins job checking logic.
## -----------------------------------------------------------------------
lint-license:
- $(MAKEDIR)/lint/license/license-check.sh
+ $(legacy-mk)/lint/license/license-check.sh
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
diff --git a/makefiles/lint/python/include.mk b/makefiles/lint/python/include.mk
index b052d84..5eb4e66 100644
--- a/makefiles/lint/python/include.mk
+++ b/makefiles/lint/python/include.mk
@@ -32,8 +32,8 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
ifndef NO-LINT-PYTHON
- include $(ONF_MAKEDIR)/lint/python/flake8.mk
- include $(ONF_MAKEDIR)/lint/python/pylint.mk
+ include $(legacy-mk)/lint/python/flake8.mk
+ include $(legacy-mk)/lint/python/pylint.mk
endif
mk-include--onf-lint-python := true
diff --git a/makefiles/release/include.mk b/makefiles/release/include.mk
index 23fad97..6899239 100644
--- a/makefiles/release/include.mk
+++ b/makefiles/release/include.mk
@@ -23,8 +23,8 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(MAKEDIR)/release/consts.mk
-include $(MAKEDIR)/release/macros.mk
+include $(legacy-mk)/release/consts.mk
+include $(legacy-mk)/release/macros.mk
## -----------------------------------------------------------------------
## Intent: Dispaly a help section for release targets
@@ -37,9 +37,9 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(MAKEDIR)/release/bbr.mk
-include $(MAKEDIR)/release/bbsim.mk
-include $(MAKEDIR)/release/bbsimctl.mk
+include $(legacy-mk)/release/bbr.mk
+include $(legacy-mk)/release/bbsim.mk
+include $(legacy-mk)/release/bbsimctl.mk
## -----------------------------------------------------------------------
## Intent: Cross-compile binaries for release