blob: ccb22e90e0af868e847c2f93d556fbd071591f7e [file] [log] [blame]
Joey Armstrong4de98b72023-02-09 14:51:38 -05001# -*- makefile -*-
Joey Armstrong9f7c57c2024-05-03 18:29:30 -04002
3## -----------------------------------------------------------------------
4## DEPRECATED
5## This file has been replaced by lf/config.mk
6## -----------------------------------------------------------------------
7
Joey Armstrong4de98b72023-02-09 14:51:38 -05008# -----------------------------------------------------------------------
Joey Armstrong9f7c57c2024-05-03 18:29:30 -04009# Copyright 2023-2024 Open Networking Foundation Contributors
Joey Armstrong4de98b72023-02-09 14:51:38 -050010#
11# Licensed under the Apache License, Version 2.0 (the "License");
12# you may not use this file except in compliance with the License.
13# You may obtain a copy of the License at
14#
15# http://www.apache.org/licenses/LICENSE-2.0
16#
17# Unless required by applicable law or agreed to in writing, software
18# distributed under the License is distributed on an "AS IS" BASIS,
19# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20# See the License for the specific language governing permissions and
21# limitations under the License.
22# -----------------------------------------------------------------------
Joey Armstrong449ce7a2023-07-18 18:32:24 -040023# https://gerrit.opencord.org/plugins/gitiles/onf-make
24# ONF.makefiles.include.version = 1.1
25# ONF.confg.mk = 1.5
26# -----------------------------------------------------------------------
Joey Armstrong4de98b72023-02-09 14:51:38 -050027
Joey Armstrong449ce7a2023-07-18 18:32:24 -040028--repo-name-- := voltha-docs
29--repo-name-- ?= $(error --repo-name--= is required)
Joey Armstrong4de98b72023-02-09 14:51:38 -050030
Joey Armstrong449ce7a2023-07-18 18:32:24 -040031##--------------------------------##
32##---] Disable lint targets [---##
33##--------------------------------##
34# NO-LINT-DOC8 := true
Joey Armstrong9f7c57c2024-05-03 18:29:30 -040035# USE_DOC8_INI := true
Joey Armstrong449ce7a2023-07-18 18:32:24 -040036# NO-LINT-GOLANG := true
37NO-LINT-GROOVY := true# # Note[1]
38# NO-LINT-JJB := true# # Note[2]
39# NO-LINT-JSON := true# # Note[1]
40NO-LINT-MAKEFILE := true# # Note[1]
41NO-LINT-REUSE := true # License check
42# NO-LINT-ROBOT := true
43NO-LINT-SHELL := true# # Note[1]
44# NO-LINT-TOX := true# # Note[1]
45NO-LINT-YAML := true# # Note[1]
46
47NO-LINT-FLAKE8 := true# # Note[1]
48# NO-LINT-PYTHON := true# # Note[1]
49NO-LINT-PYLINT := true# # Note[1]
50
51# Note[1] - A boatload of source to cleanup prior to enable.
52# Note[2] - No sources available
53
54##---------------------------------##
55##---] Conditional make logic [---##
56##---------------------------------##
57# USE-ONF-DOCKER-MK := true
58# USE-ONF-GERRIT-MK := true
59# USE-ONF-GIT-MK := true
60# USE-ONF-JJB-MK := true
61# USE-VOLTHA-RELEASE-MK := true
62
63##----------------------##
64##---] Debug Mode [---##
65##----------------------##
66# export DEBUG := 1 # makefile debug
67# export DISTUTILS_DEBUG := 1 # verbose: pip
68# export DOCKER_DEBUG := 1 # verbose: docker
69# export VERBOSE := 1 # makefile debug
70
71##-----------------------------------##
72##---] JJB/Jenkins Job Builder [---##
73##-----------------------------------##
74JJB_VERSION ?= 2.8.0
75JOBCONFIG_DIR ?= job-configs
76
77##---------------------------------##
78##---] Filesystem exclusions [---##
79##---------------------------------##
80onf-excl-dirs := $(null) # make clean: dirs=
Joey Armstrong9f7c57c2024-05-03 18:29:30 -040081onf-excl-dirs += lf/onf-make # repo:onf-make git submodule
Joey Armstrong449ce7a2023-07-18 18:32:24 -040082onf-excl-dirs += .venv# # $(venv-name)
83onf-excl-dirs += vendor# # golang / voltha*-go
84onf-excl-dirs += patches# # voltha docs - python upgrade
Joey Armstrong9f7c57c2024-05-03 18:29:30 -040085onf-excl-dirs += .tmp #
Joey Armstrong449ce7a2023-07-18 18:32:24 -040086onf-excl-dirs += .tox # also a python dependency
Joey Armstrong9f7c57c2024-05-03 18:29:30 -040087# onf-excl-dirs += vendor# # golang / voltha*-go -- local exclude
88
89# [NOTE] Add exclusions: lint/doc8/doc8.incl
Joey Armstrong449ce7a2023-07-18 18:32:24 -040090
91ifeq ($(--repo-name--),voltha-docs)
Joey Armstrong9f7c57c2024-05-03 18:29:30 -040092 lint-doc8-excl += '_build' # generated
Joey Armstrong449ce7a2023-07-18 18:32:24 -040093endif
94
95onf-excl-dirs ?= $(error onf-excl-dirs= is required)
Joey Armstrong4de98b72023-02-09 14:51:38 -050096
97##-----------------------------##
Joey Armstrong449ce7a2023-07-18 18:32:24 -040098##---] Feature Detection [---##
Joey Armstrong4de98b72023-02-09 14:51:38 -050099##-----------------------------##
Joey Armstrong449ce7a2023-07-18 18:32:24 -0400100# [TODO] include makefiles/features/include.mk
101# [TODO] All logic below can migrate there.
Joey Armstrong4de98b72023-02-09 14:51:38 -0500102
Joey Armstrong449ce7a2023-07-18 18:32:24 -0400103$(if $(filter %ci-management,$(--repo-name--)),\
104 $(eval --REPO-IS-CI-MANAGEMENT-- := true)\
105)
Joey Armstrong9f7c57c2024-05-03 18:29:30 -0400106
Joey Armstrong449ce7a2023-07-18 18:32:24 -0400107$(if $(filter %voltha-docs,$(--repo-name--)),\
108 $(eval --REPO-IS-VOLTHA-DOCS-- := true)\
109)
110
111# create makefiles/config/byrepo/{--repo-name--}.mk for one-off snowflakes ?
112# $(if $(wildcard docker),$(eval USE-ONF-DOCKER-MK := true))
113
114##-------------------------##
115##---] Derived Flags [---##
116##-------------------------##
117ifdef --REPO-IS-CI-MANAGEMENT--
118 USE-ONF-JJB := true
119
120 onf-excl-dirs += global-jjb
121 onf-excl-dirs += lf-ansible
122 onf-excl-dirs += packer
123endif
124
125ifdef --REPO-IS-VOLTHA-DOCS--
126 onf-excl-dirs += _build
127 onf-excl-dirs += repos
128endif
129
130ifdef NO-LINT-PYTHON
131 NO-LINT-FLAKE8 := true
132 NO-LINT-PYLINT := true
133endif
134
135ifndef USE-ONF-JJB
136 NO-LINT-JJB := true
137endif
138
139onf-excl-dirs := $(sort $(strip $(onf-excl-dirs)))
140
Joey Armstrong9f7c57c2024-05-03 18:29:30 -0400141# --------------------------------------------------------------------
Joey Armstrong449ce7a2023-07-18 18:32:24 -0400142# [TODO]#
143# --------------------------------------------------------------------
144# o two distinct makefiles directories are needed, one for onf-make
145# o second for repository specific configs and logic.
146# o Two independent vars specify path:
147# ONF_MAKEDIR = library makefiles
148# MAKEDIR = repository specific content
149# o Conditional repository testing above can crush down into
150# include $(MAKEDIR)/config.mk # repo:$(--repo-name--)
151# --------------------------------------------------------------------
Joey Armstrong4de98b72023-02-09 14:51:38 -0500152
153# [EOF]