blob: 8ac516774ef2595bc5db3a8d7065d542d27d786d [file] [log] [blame]
Joey Armstrong65405412022-11-22 10:43:06 -05001# -*- makefile -*-
Joey Armstrong3f575f72023-01-15 23:49:19 -05002# -----------------------------------------------------------------------
Joey Armstrong518f3572024-02-11 07:56:25 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF 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#
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 Armstrong65405412022-11-22 10:43:06 -050017
Joey Armstrong068d6452023-02-01 11:09:18 -050018.PHONY: help clean help test
19.DEFAULT_GOAL := help
Zack Williamsc2140b92018-04-05 09:19:22 -070020
Joey Armstrong3f575f72023-01-15 23:49:19 -050021##-------------------##
22##---] GLOBALS [---##
23##-------------------##
Joey Armstrong3f575f72023-01-15 23:49:19 -050024
Joey Armstrong3f575f72023-01-15 23:49:19 -050025##--------------------##
26##---] INCLUDES [---##
27##--------------------##
Joey Armstrong56fdfec2024-03-01 13:43:36 -050028# include config.mk
29include lf/include.mk
30
Joey Armstrongdd334492023-07-09 17:59:02 -040031ONF_MAKEDIR ?= $(error ONF_MAKEDIR= is required)
Joey Armstrong3f575f72023-01-15 23:49:19 -050032
Joey Armstrong29874122023-09-21 12:34:34 -040033# [TODO]
Joey Armstrong3f575f72023-01-15 23:49:19 -050034# JJB_VERSION ?= 4.1.0
Zack Williamsc2140b92018-04-05 09:19:22 -070035
Joey Armstrong01bbf8d2023-03-05 06:20:14 -050036# -----------------------------------------------------------------------
37# horrible dep: (ie -- .PHONY: $(JOBCONFIG_DIR))
38# o Directory inode always changing due to (time-last-accessed++).
39# o Dependent Targets always re-made due to setale dependency.
40# o Use file inside directory as dep rather than a directory.
41# -----------------------------------------------------------------------
Zack Williamsc2140b92018-04-05 09:19:22 -070042$(JOBCONFIG_DIR):
43 mkdir $@
44
Joey Armstrongdd334492023-07-09 17:59:02 -040045# -----------------------------------------------------------------------
46# Intent: Generate pipeline jobs
47# -----------------------------------------------------------------------
48build : jjb-gen
49
Joey Armstrong01bbf8d2023-03-05 06:20:14 -050050##-------------------##
51##---] TARGETS [---##
52##-------------------##
Joey Armstrongdd334492023-07-09 17:59:02 -040053## Display make help summary late
54include $(ONF_MAKEDIR)/help/trailer.mk
Joey Armstrong3f575f72023-01-15 23:49:19 -050055
Joey Armstrongdd334492023-07-09 17:59:02 -040056# make help not widely in use yet so be explicit
57help ::
Joey Armstrongf2e312c2024-03-01 12:00:05 -050058
Joey Armstrongdd334492023-07-09 17:59:02 -040059 @echo
60 @echo 'Usage: $(MAKE) help ...'
Joey Armstrongf2e312c2024-03-01 12:00:05 -050061
Joey Armstrongdd334492023-07-09 17:59:02 -040062 @echo ' % make clean sterile'
Joey Armstrongf2e312c2024-03-01 12:00:05 -050063 @printf ' %-33.33s %s\n' 'lint' \
64 'Invoke syntax checking targets'
65 @printf ' %-33.33s %s\n' 'build' \
66 'Invoke jenkins-jobs to regenerate pipelines'
Joey Armstrongdd334492023-07-09 17:59:02 -040067 @echo ' % make test'
68 @echo ' % make help # show all available targes'
Joey Armstrong65405412022-11-22 10:43:06 -050069
Joey Armstrongf2e312c2024-03-01 12:00:05 -050070 @echo
71 @echo '[HELP: modifiers]'
72 @printf ' %-33.33s %s\n' '{topic}-help' \
73 'Display extended help for individual makefile targets'
74 @printf ' %-33.33s %s\n' 'help-verbose' \
75 'Display exhaustive help'
76
77## -----------------------------------------------------------------------
78## -----------------------------------------------------------------------
79build-help :
80 @printf ' %-33.33s %s\n' 'build' \
81 'Alias for $(MAKE) jjb-gen'
82 @printf ' %-33.33s %s\n' 'jjb-gen' \
83 'Invoke jenkins-jobs to regenerate pipelines'
84
85## -----------------------------------------------------------------------
86## -----------------------------------------------------------------------
87lint-help :
88 @printf ' %-33.33s %s\n' 'lint' \
89 'Perform syntax checking on configured sources'
90 @printf ' %-33.33s %s\n' 'lint-jjb' \
91 'Invoke jenkins-jobs to syntax check JJB source'
92
93## -----------------------------------------------------------------------
94## -----------------------------------------------------------------------
95help-verbose :: help $(help-verbose)
96
Joey Armstrong65405412022-11-22 10:43:06 -050097# [EOF]