blob: 59de741eafceb48beb40948a84e316e98bc12ec1 [file] [log] [blame]
Joey Armstrong65405412022-11-22 10:43:06 -05001# -*- makefile -*-
Joey Armstrong3f575f72023-01-15 23:49:19 -05002# -----------------------------------------------------------------------
Joey Armstrong72ee7202024-03-11 11:51:40 -04003# Copyright 2022-2024 Open Networking Foundation Contributors
Joey Armstrong3f575f72023-01-15 23:49:19 -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#
Joey Armstrong72ee7202024-03-11 11:51:40 -04009# http:#www.apache.org/licenses/LICENSE-2.0
Joey Armstrong3f575f72023-01-15 23:49:19 -050010#
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 Armstrong72ee7202024-03-11 11:51:40 -040017# SPDX-FileCopyrightText: 2022-2024 Open Networking Foundation Contributors
18# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstrong65405412022-11-22 10:43:06 -050020
Joey Armstrong068d6452023-02-01 11:09:18 -050021.PHONY: help clean help test
22.DEFAULT_GOAL := help
Zack Williamsc2140b92018-04-05 09:19:22 -070023
Joey Armstrong3f575f72023-01-15 23:49:19 -050024##-------------------##
25##---] GLOBALS [---##
26##-------------------##
Joey Armstrong3f575f72023-01-15 23:49:19 -050027
Joey Armstrong3f575f72023-01-15 23:49:19 -050028##--------------------##
29##---] INCLUDES [---##
30##--------------------##
Joey Armstrong980e37f2023-02-28 18:57:41 -050031include config.mk
Joey Armstrongdd334492023-07-09 17:59:02 -040032include makefiles/include.mk
33ONF_MAKEDIR ?= $(error ONF_MAKEDIR= is required)
Joey Armstrong3f575f72023-01-15 23:49:19 -050034
Joey Armstrong29874122023-09-21 12:34:34 -040035# [TODO]
Joey Armstrong3f575f72023-01-15 23:49:19 -050036# JJB_VERSION ?= 4.1.0
Zack Williamsc2140b92018-04-05 09:19:22 -070037
Joey Armstrong01bbf8d2023-03-05 06:20:14 -050038# -----------------------------------------------------------------------
39# horrible dep: (ie -- .PHONY: $(JOBCONFIG_DIR))
40# o Directory inode always changing due to (time-last-accessed++).
41# o Dependent Targets always re-made due to setale dependency.
42# o Use file inside directory as dep rather than a directory.
43# -----------------------------------------------------------------------
Zack Williamsc2140b92018-04-05 09:19:22 -070044$(JOBCONFIG_DIR):
45 mkdir $@
46
Joey Armstrongdd334492023-07-09 17:59:02 -040047# -----------------------------------------------------------------------
48# Intent: Generate pipeline jobs
49# -----------------------------------------------------------------------
50build : jjb-gen
51
Joey Armstrong01bbf8d2023-03-05 06:20:14 -050052##-------------------##
53##---] TARGETS [---##
54##-------------------##
Joey Armstrongdd334492023-07-09 17:59:02 -040055## Display make help summary late
56include $(ONF_MAKEDIR)/help/trailer.mk
Joey Armstrong3f575f72023-01-15 23:49:19 -050057
Joey Armstrongdd334492023-07-09 17:59:02 -040058# make help not widely in use yet so be explicit
59help ::
Joey Armstrongf2e312c2024-03-01 12:00:05 -050060
Joey Armstrongdd334492023-07-09 17:59:02 -040061 @echo
62 @echo 'Usage: $(MAKE) help ...'
Joey Armstrongf2e312c2024-03-01 12:00:05 -050063
Joey Armstrongdd334492023-07-09 17:59:02 -040064 @echo ' % make clean sterile'
Joey Armstrongf2e312c2024-03-01 12:00:05 -050065 @printf ' %-33.33s %s\n' 'lint' \
66 'Invoke syntax checking targets'
67 @printf ' %-33.33s %s\n' 'build' \
68 'Invoke jenkins-jobs to regenerate pipelines'
Joey Armstrongdd334492023-07-09 17:59:02 -040069 @echo ' % make test'
70 @echo ' % make help # show all available targes'
Joey Armstrong65405412022-11-22 10:43:06 -050071
Joey Armstrongf2e312c2024-03-01 12:00:05 -050072 @echo
73 @echo '[HELP: modifiers]'
74 @printf ' %-33.33s %s\n' '{topic}-help' \
75 'Display extended help for individual makefile targets'
76 @printf ' %-33.33s %s\n' 'help-verbose' \
77 'Display exhaustive help'
78
79## -----------------------------------------------------------------------
80## -----------------------------------------------------------------------
81build-help :
82 @printf ' %-33.33s %s\n' 'build' \
83 'Alias for $(MAKE) jjb-gen'
84 @printf ' %-33.33s %s\n' 'jjb-gen' \
85 'Invoke jenkins-jobs to regenerate pipelines'
86
87## -----------------------------------------------------------------------
88## -----------------------------------------------------------------------
89lint-help :
90 @printf ' %-33.33s %s\n' 'lint' \
91 'Perform syntax checking on configured sources'
92 @printf ' %-33.33s %s\n' 'lint-jjb' \
93 'Invoke jenkins-jobs to syntax check JJB source'
94
95## -----------------------------------------------------------------------
96## -----------------------------------------------------------------------
97help-verbose :: help $(help-verbose)
98
Joey Armstrong65405412022-11-22 10:43:06 -050099# [EOF]