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 | # ----------------------------------------------------------------------- |
| 3 | # Copyright 2022-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 | 6540541 | 2022-11-22 10:43:06 -0500 | [diff] [blame] | 17 | |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 18 | # Makefile for testing JJB jobs in a virtualenv |
Joey Armstrong | 068d645 | 2023-02-01 11:09:18 -0500 | [diff] [blame] | 19 | .PHONY: help clean help test |
| 20 | .DEFAULT_GOAL := help |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 21 | |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 22 | ##-------------------## |
| 23 | ##---] GLOBALS [---## |
| 24 | ##-------------------## |
| 25 | TOP ?= . |
| 26 | MAKEDIR ?= $(TOP)/makefiles |
Joey Armstrong | 068d645 | 2023-02-01 11:09:18 -0500 | [diff] [blame] | 27 | export SHELL := bash -e -o pipefail# # [TODO] remove once set -u cleaned up |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 28 | |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 29 | ##--------------------## |
| 30 | ##---] INCLUDES [---## |
| 31 | ##--------------------## |
Joey Armstrong | 980e37f | 2023-02-28 18:57:41 -0500 | [diff] [blame] | 32 | include config.mk |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 33 | include $(MAKEDIR)/include.mk |
| 34 | |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 35 | VENV_DIR ?= venv-jjb |
Joey Armstrong | 0895a88 | 2023-02-06 14:50:39 -0500 | [diff] [blame] | 36 | JJB_VERSION ?= 2.8.0 |
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 | JOBCONFIG_DIR ?= job-configs |
| 39 | |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame^] | 40 | # ----------------------------------------------------------------------- |
| 41 | # horrible dep: (ie -- .PHONY: $(JOBCONFIG_DIR)) |
| 42 | # o Directory inode always changing due to (time-last-accessed++). |
| 43 | # o Dependent Targets always re-made due to setale dependency. |
| 44 | # o Use file inside directory as dep rather than a directory. |
| 45 | # ----------------------------------------------------------------------- |
Zack Williams | c2140b9 | 2018-04-05 09:19:22 -0700 | [diff] [blame] | 46 | $(JOBCONFIG_DIR): |
| 47 | mkdir $@ |
| 48 | |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame^] | 49 | ##-------------------## |
| 50 | ##---] TARGETS [---## |
| 51 | ##-------------------## |
| 52 | include $(MAKEDIR)/targets/check.mk |
| 53 | include $(MAKEDIR)/targets/tox.mk# # python unit testing |
| 54 | include $(MAKEDIR)/targets/test.mk |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 55 | |
Joey Armstrong | 068d645 | 2023-02-01 11:09:18 -0500 | [diff] [blame] | 56 | ## Display make help late |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 57 | include $(ONF_MAKE)/help/trailer.mk |
Joey Armstrong | 6540541 | 2022-11-22 10:43:06 -0500 | [diff] [blame] | 58 | |
| 59 | # [EOF] |