Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 2 | |
| 3 | ## ----------------------------------------------------------------------- |
| 4 | ## DEPRECATED |
| 5 | ## This file has been replaced by lf/config.mk |
| 6 | ## ----------------------------------------------------------------------- |
| 7 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 8 | # ----------------------------------------------------------------------- |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 9 | # Copyright 2023-2024 Open Networking Foundation Contributors |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 10 | # |
| 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 Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 23 | # https://gerrit.opencord.org/plugins/gitiles/onf-make |
| 24 | # ONF.makefiles.include.version = 1.1 |
| 25 | # ONF.confg.mk = 1.5 |
| 26 | # ----------------------------------------------------------------------- |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 27 | |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 28 | --repo-name-- := voltha-docs |
| 29 | --repo-name-- ?= $(error --repo-name--= is required) |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 30 | |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 31 | ##--------------------------------## |
| 32 | ##---] Disable lint targets [---## |
| 33 | ##--------------------------------## |
| 34 | # NO-LINT-DOC8 := true |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 35 | # USE_DOC8_INI := true |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 36 | # NO-LINT-GOLANG := true |
| 37 | NO-LINT-GROOVY := true# # Note[1] |
| 38 | # NO-LINT-JJB := true# # Note[2] |
| 39 | # NO-LINT-JSON := true# # Note[1] |
| 40 | NO-LINT-MAKEFILE := true# # Note[1] |
| 41 | NO-LINT-REUSE := true # License check |
| 42 | # NO-LINT-ROBOT := true |
| 43 | NO-LINT-SHELL := true# # Note[1] |
| 44 | # NO-LINT-TOX := true# # Note[1] |
| 45 | NO-LINT-YAML := true# # Note[1] |
| 46 | |
| 47 | NO-LINT-FLAKE8 := true# # Note[1] |
| 48 | # NO-LINT-PYTHON := true# # Note[1] |
| 49 | NO-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 | ##-----------------------------------## |
| 74 | JJB_VERSION ?= 2.8.0 |
| 75 | JOBCONFIG_DIR ?= job-configs |
| 76 | |
| 77 | ##---------------------------------## |
| 78 | ##---] Filesystem exclusions [---## |
| 79 | ##---------------------------------## |
| 80 | onf-excl-dirs := $(null) # make clean: dirs= |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 81 | onf-excl-dirs += lf/onf-make # repo:onf-make git submodule |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 82 | onf-excl-dirs += .venv# # $(venv-name) |
| 83 | onf-excl-dirs += vendor# # golang / voltha*-go |
| 84 | onf-excl-dirs += patches# # voltha docs - python upgrade |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 85 | onf-excl-dirs += .tmp # |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 86 | onf-excl-dirs += .tox # also a python dependency |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 87 | # onf-excl-dirs += vendor# # golang / voltha*-go -- local exclude |
| 88 | |
| 89 | # [NOTE] Add exclusions: lint/doc8/doc8.incl |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 90 | |
| 91 | ifeq ($(--repo-name--),voltha-docs) |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 92 | lint-doc8-excl += '_build' # generated |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 93 | endif |
| 94 | |
| 95 | onf-excl-dirs ?= $(error onf-excl-dirs= is required) |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 96 | |
| 97 | ##-----------------------------## |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 98 | ##---] Feature Detection [---## |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 99 | ##-----------------------------## |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 100 | # [TODO] include makefiles/features/include.mk |
| 101 | # [TODO] All logic below can migrate there. |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 102 | |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 103 | $(if $(filter %ci-management,$(--repo-name--)),\ |
| 104 | $(eval --REPO-IS-CI-MANAGEMENT-- := true)\ |
| 105 | ) |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 106 | |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 107 | $(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 | ##-------------------------## |
| 117 | ifdef --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 |
| 123 | endif |
| 124 | |
| 125 | ifdef --REPO-IS-VOLTHA-DOCS-- |
| 126 | onf-excl-dirs += _build |
| 127 | onf-excl-dirs += repos |
| 128 | endif |
| 129 | |
| 130 | ifdef NO-LINT-PYTHON |
| 131 | NO-LINT-FLAKE8 := true |
| 132 | NO-LINT-PYLINT := true |
| 133 | endif |
| 134 | |
| 135 | ifndef USE-ONF-JJB |
| 136 | NO-LINT-JJB := true |
| 137 | endif |
| 138 | |
| 139 | onf-excl-dirs := $(sort $(strip $(onf-excl-dirs))) |
| 140 | |
Joey Armstrong | 9f7c57c | 2024-05-03 18:29:30 -0400 | [diff] [blame^] | 141 | # -------------------------------------------------------------------- |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 142 | # [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 Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 152 | |
| 153 | # [EOF] |