Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
| 3 | # Copyright 2023 Open Networking Foundation (ONF) and the ONF Contributors |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # ----------------------------------------------------------------------- |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 17 | # https://gerrit.opencord.org/plugins/gitiles/onf-make |
| 18 | # ONF.makefiles.include.version = 1.1 |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 19 | # ONF.confg.mk = 1.5 |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 20 | # ----------------------------------------------------------------------- |
| 21 | |
| 22 | # --repo-name-- := |
| 23 | --repo-name-- ?= $(error --repo-name--= is required) |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 24 | |
| 25 | ##--------------------------------## |
| 26 | ##---] Disable lint targets [---## |
| 27 | ##--------------------------------## |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 28 | # NO-LINT-DOC8 := true |
| 29 | # NO-LINT-GOLANG := true |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 30 | # NO-LINT-GROOVY := true# # Note[1] |
| 31 | # NO-LINT-JJB := true# # Note[2] |
| 32 | # NO-LINT-JSON := true# # Note[1] |
| 33 | # NO-LINT-MAKEFILE := true# # Note[1] |
| 34 | # NO-LINT-REUSE := true # License check |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 35 | # NO-LINT-ROBOT := true |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 36 | # NO-LINT-SHELL := true# # Note[1] |
| 37 | # NO-LINT-YAML := true# # Note[1] |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 38 | |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 39 | # NO-LINT-FLAKE8 := true# # Note[1] |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 40 | # NO-LINT-PYTHON := true# # Note[1] |
| 41 | # NO-LINT-PYLINT := true# # Note[1] |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 42 | |
| 43 | # Note[1] - A boatload of source to cleanup prior to enable. |
| 44 | # Note[2] - No sources available |
| 45 | |
| 46 | ##---------------------------------## |
| 47 | ##---] Conditional make logic [---## |
| 48 | ##---------------------------------## |
| 49 | # USE-ONF-DOCKER-MK := true |
| 50 | # USE-ONF-GERRIT-MK := true |
| 51 | # USE-ONF-GIT-MK := true |
| 52 | # USE-ONF-JJB-MK := true |
| 53 | # USE-VOLTHA-RELEASE-MK := true |
| 54 | |
| 55 | ##----------------------## |
| 56 | ##---] Debug Mode [---## |
| 57 | ##----------------------## |
| 58 | # export DEBUG := 1 # makefile debug |
| 59 | # export DISTUTILS_DEBUG := 1 # verbose: pip |
| 60 | # export DOCKER_DEBUG := 1 # verbose: docker |
| 61 | # export VERBOSE := 1 # makefile debug |
| 62 | |
| 63 | ##-----------------------------------## |
| 64 | ##---] JJB/Jenkins Job Builder [---## |
| 65 | ##-----------------------------------## |
| 66 | JJB_VERSION ?= 2.8.0 |
| 67 | JOBCONFIG_DIR ?= job-configs |
| 68 | |
| 69 | ##---------------------------------## |
| 70 | ##---] Filesystem exclusions [---## |
| 71 | ##---------------------------------## |
| 72 | onf-excl-dirs := $(null) # make clean: dirs= |
| 73 | onf-excl-dirs += .venv# # $(venv-name) |
| 74 | onf-excl-dirs += vendor# # golang / voltha*-go |
| 75 | onf-excl-dirs += patches# # voltha docs - python upgrade |
| 76 | onf-excl-dirs += .tox # also a python dependency |
| 77 | |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 78 | ifeq ($(--repo-name--),voltha-docs) |
| 79 | lint-doc8-excl += '_build' |
| 80 | endif |
| 81 | |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 82 | onf-excl-dirs ?= $(error onf-excl-dirs= is required) |
| 83 | |
| 84 | ##-----------------------------## |
| 85 | ##---] Feature Detection [---## |
| 86 | ##-----------------------------## |
| 87 | # [TODO] include makefiles/features/include.mk |
| 88 | # [TODO] All logic below can migrate there. |
| 89 | |
| 90 | $(if $(filter %ci-management,$(--repo-name--)),\ |
| 91 | $(eval --REPO-IS-CI-MANAGEMENT-- := true)\ |
| 92 | ) |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 93 | $(if $(filter %voltha-docs,$(--repo-name--)),\ |
| 94 | $(eval --REPO-IS-VOLTHA-DOCS-- := true)\ |
| 95 | ) |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 96 | |
| 97 | # create makefiles/config/byrepo/{--repo-name--}.mk for one-off snowflakes ? |
| 98 | # $(if $(wildcard docker),$(eval USE-ONF-DOCKER-MK := true)) |
| 99 | |
| 100 | ##-------------------------## |
| 101 | ##---] Derived Flags [---## |
| 102 | ##-------------------------## |
| 103 | ifdef --REPO-IS-CI-MANAGEMENT-- |
| 104 | USE-ONF-JJB := true |
| 105 | |
| 106 | onf-excl-dirs += global-jjb |
| 107 | onf-excl-dirs += lf-ansible |
| 108 | onf-excl-dirs += packer |
| 109 | endif |
| 110 | |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 111 | ifdef --REPO-IS-VOLTHA-DOCS-- |
| 112 | onf-excl-dirs += _build |
| 113 | onf-excl-dirs += repos |
| 114 | endif |
| 115 | |
Joey Armstrong | 7ad5c36 | 2023-07-09 19:10:16 -0400 | [diff] [blame] | 116 | ifdef NO-LINT-PYTHON |
| 117 | NO-LINT-FLAKE8 := true |
| 118 | NO-LINT-PYLINT := true |
| 119 | endif |
| 120 | |
| 121 | ifndef USE-ONF-JJB |
| 122 | NO-LINT-JJB := true |
| 123 | endif |
| 124 | |
| 125 | onf-excl-dirs := $(sort $(strip $(onf-excl-dirs))) |
Joey Armstrong | a689034 | 2023-06-01 17:07:51 -0400 | [diff] [blame] | 126 | |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 127 | # -------------------------------------------------------------------- |
| 128 | # Repository specific values |
| 129 | # -------------------------------------------------------------------- |
| 130 | # sterile-dirs += archives |
Joey Armstrong | 7805bbd | 2023-07-07 08:37:04 -0400 | [diff] [blame] | 131 | |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 132 | # [EOF] |