Joey Armstrong | 6540541 | 2022-11-22 10:43:06 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | 72ee720 | 2024-03-11 11:51:40 -0400 | [diff] [blame] | 3 | # Copyright 2022-2024 Open Networking Foundation Contributors |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 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 | # |
Joey Armstrong | 72ee720 | 2024-03-11 11:51:40 -0400 | [diff] [blame] | 9 | # http:#www.apache.org/licenses/LICENSE-2.0 |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 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 | 72ee720 | 2024-03-11 11:51:40 -0400 | [diff] [blame] | 17 | # SPDX-FileCopyrightText: 2022-2024 Open Networking Foundation Contributors |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
Joey Armstrong | 6540541 | 2022-11-22 10:43:06 -0500 | [diff] [blame] | 20 | |
Joey Armstrong | 068d645 | 2023-02-01 11:09:18 -0500 | [diff] [blame] | 21 | .PHONY: help clean help test |
| 22 | .DEFAULT_GOAL := help |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 23 | |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 24 | ##-------------------## |
| 25 | ##---] GLOBALS [---## |
| 26 | ##-------------------## |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 27 | |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 28 | ##--------------------## |
| 29 | ##---] INCLUDES [---## |
| 30 | ##--------------------## |
Joey Armstrong | 56fdfec | 2024-03-01 13:43:36 -0500 | [diff] [blame] | 31 | # include config.mk |
| 32 | include lf/include.mk |
| 33 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 34 | ONF_MAKEDIR ?= $(error ONF_MAKEDIR= is required) |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 35 | |
Joey Armstrong | 2987412 | 2023-09-21 12:34:34 -0400 | [diff] [blame] | 36 | # [TODO] |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 37 | # JJB_VERSION ?= 4.1.0 |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 38 | |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 39 | # ----------------------------------------------------------------------- |
| 40 | # horrible dep: (ie -- .PHONY: $(JOBCONFIG_DIR)) |
| 41 | # o Directory inode always changing due to (time-last-accessed++). |
Joey Armstrong | e711087 | 2024-03-22 14:23:34 -0400 | [diff] [blame^] | 42 | # o Dependent Targets always re-made due to stale dependency. |
| 43 | # o Use one file inside directory as dep rather than dep-on-a-directory. |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 44 | # ----------------------------------------------------------------------- |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 45 | $(JOBCONFIG_DIR): |
| 46 | mkdir $@ |
| 47 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 48 | # ----------------------------------------------------------------------- |
| 49 | # Intent: Generate pipeline jobs |
| 50 | # ----------------------------------------------------------------------- |
| 51 | build : jjb-gen |
| 52 | |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 53 | ##-------------------## |
| 54 | ##---] TARGETS [---## |
| 55 | ##-------------------## |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 56 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 57 | # make help not widely in use yet so be explicit |
| 58 | help :: |
Joey Armstrong | f2e312c | 2024-03-01 12:00:05 -0500 | [diff] [blame] | 59 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 60 | @echo |
| 61 | @echo 'Usage: $(MAKE) help ...' |
Joey Armstrong | f2e312c | 2024-03-01 12:00:05 -0500 | [diff] [blame] | 62 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 63 | @echo ' % make clean sterile' |
Joey Armstrong | f2e312c | 2024-03-01 12:00:05 -0500 | [diff] [blame] | 64 | @printf ' %-33.33s %s\n' 'lint' \ |
| 65 | 'Invoke syntax checking targets' |
| 66 | @printf ' %-33.33s %s\n' 'build' \ |
| 67 | 'Invoke jenkins-jobs to regenerate pipelines' |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 68 | @echo ' % make test' |
| 69 | @echo ' % make help # show all available targes' |
Joey Armstrong | 6540541 | 2022-11-22 10:43:06 -0500 | [diff] [blame] | 70 | |
Joey Armstrong | f2e312c | 2024-03-01 12:00:05 -0500 | [diff] [blame] | 71 | @echo |
| 72 | @echo '[HELP: modifiers]' |
| 73 | @printf ' %-33.33s %s\n' '{topic}-help' \ |
| 74 | 'Display extended help for individual makefile targets' |
| 75 | @printf ' %-33.33s %s\n' 'help-verbose' \ |
| 76 | 'Display exhaustive help' |
| 77 | |
| 78 | ## ----------------------------------------------------------------------- |
| 79 | ## ----------------------------------------------------------------------- |
| 80 | build-help : |
| 81 | @printf ' %-33.33s %s\n' 'build' \ |
| 82 | 'Alias for $(MAKE) jjb-gen' |
| 83 | @printf ' %-33.33s %s\n' 'jjb-gen' \ |
| 84 | 'Invoke jenkins-jobs to regenerate pipelines' |
| 85 | |
| 86 | ## ----------------------------------------------------------------------- |
| 87 | ## ----------------------------------------------------------------------- |
| 88 | lint-help : |
| 89 | @printf ' %-33.33s %s\n' 'lint' \ |
| 90 | 'Perform syntax checking on configured sources' |
| 91 | @printf ' %-33.33s %s\n' 'lint-jjb' \ |
| 92 | 'Invoke jenkins-jobs to syntax check JJB source' |
| 93 | |
| 94 | ## ----------------------------------------------------------------------- |
| 95 | ## ----------------------------------------------------------------------- |
| 96 | help-verbose :: help $(help-verbose) |
| 97 | |
Joey Armstrong | 6540541 | 2022-11-22 10:43:06 -0500 | [diff] [blame] | 98 | # [EOF] |