blob: e95c9b7ea7336fc8ecdf2347d32409ba06a6f91d [file] [log] [blame]
Joey Armstrong695ba5c2023-01-20 11:17:49 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong6f63edf2024-01-12 11:30:08 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong695ba5c2023-01-20 11:17:49 -05004#
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 Armstrong6f63edf2024-01-12 11:30:08 -050017# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong695ba5c2023-01-20 11:17:49 -050018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstrong99a72d02023-06-09 10:26:42 -040020# https://gerrit.opencord.org/plugins/gitiles/onf-make
21# ONF.makefile.version = 1.0
22# -----------------------------------------------------------------------
23
24ifndef mk-include--onf-make # single-include guard macor
Joey Armstrong695ba5c2023-01-20 11:17:49 -050025
26$(if $(DEBUG),$(warning ENTER))
27
Joey Armstrong99a72d02023-06-09 10:26:42 -040028## -----------------------------------------------------------------------
29## Define vars based on relative import (normalize symlinks)
30## Usage: include makefiles/onf/include.mk
31## -----------------------------------------------------------------------
32onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST)))
33onf-mk-top := $(subst /include.mk,$(null),$(onf-mk-abs))
34ONF_MAKEDIR := $(onf-mk-top)
Joey Armstrong695ba5c2023-01-20 11:17:49 -050035
Joey Armstrong2301cb32024-05-01 18:39:52 -040036onf-mk-dir ?= $(onf-mk-top)# # fodder for transition.mk
37
Joey Armstrong99a72d02023-06-09 10:26:42 -040038include $(ONF_MAKEDIR)/consts.mk
39include $(ONF_MAKEDIR)/help/include.mk # render target help
40include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
41include $(ONF_MAKEDIR)/etc/include.mk # banner macros
42
Joey Armstrong6f63edf2024-01-12 11:30:08 -050043include $(ONF_MAKEDIR)/virtualenv/include.mk# # lint depends on venv
Joey Armstrong99a72d02023-06-09 10:26:42 -040044include $(ONF_MAKEDIR)/lint/include.mk
45# include $(ONF_MAKEDIR)/git-submodules.mk
46# include $(ONF_MAKEDIR)/gerrit/include.mk
47
Joey Armstrong2301cb32024-05-01 18:39:52 -040048include $(ONF_MAKEDIR)/commands/pre-commit/include.mk
49
Joey Armstrong99a72d02023-06-09 10:26:42 -040050include $(ONF_MAKEDIR)/todo.mk
51include $(ONF_MAKEDIR)/help/variables.mk
52
53##---------------------##
54##---] ON_DEMAND [---##
55##---------------------##
56$(if $(USE_DOCKER_MK),$(eval $(ONF_MAKEDIR)/docker/include.mk))
57
58##-------------------##
59##---] TARGETS [---##
60##-------------------##
61include $(ONF_MAKEDIR)/targets/clean.mk
62# include $(ONF_MAKEDIR)/targets/check.mk
63include $(ONF_MAKEDIR)/targets/sterile.mk
64# include $(ONF_MAKEDIR)/targets/test.mk
Joey Armstrong695ba5c2023-01-20 11:17:49 -050065
66$(if $(DEBUG),$(warning LEAVE))
67
Joey Armstrong99a72d02023-06-09 10:26:42 -040068## --------------------------------------------------------------------------
69## structure to support pre/post target handling w/o inlining in Makefile (?)
70## --------------------------------------------------------------------------
71## include makefiles/include.mk
72## include makefiles/main/enter.mk
73## [... include *.mk ...]
74## include makefiles/main/leave.mk
75
76mk-include--onf-make := true
77
78endif # mk-include--onf-make
79
Joey Armstrong695ba5c2023-01-20 11:17:49 -050080# [EOF]