| # -*- makefile -*- |
| ## ----------------------------------------------------------------------- |
| # Copyright 2020-2023 Open Networking Foundation (ONF) and the ONF Contributors <support@opennetworking.org> |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # ----------------------------------------------------------------------- |
| # SPDX-FileCopyrightText: Copyright 2020-2023 Open Networking Foundation (ONF) and the ONF Contributors <support@opennetworking.org> |
| # SPDX-License-Identifier: Apache-2.0 |
| # ----------------------------------------------------------------------- |
| |
| ## Boot loader |
| onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST))) |
| onf-mk-top := $(dir $(onf-mk-abs)) |
| onf-mk-top := $(patsubst %/,%,$(onf-mk-top)) |
| |
| include $(onf-mk-top)/makefiles/include.mk |
| |
| ##-------------------## |
| ##---] GLOBALS [---## |
| ##-------------------## |
| # change to be 'python3 -m cProfile -s cumtime' to profile a script |
| # PYTHON ?= python3 |
| |
| .DEFAULT_GOAL := help |
| .PHONY: cggs license clean-all help |
| |
| # build targets |
| |
| ## ----------------------------------------------------------------------- |
| ## ----------------------------------------------------------------------- |
| CGGS_ARGS ?= --debug |
| |
| cggs : $(venv-activate-script) |
| $(activate) && python cggs.py $(CGGS_ARGS) settings.json |
| |
| ## ----------------------------------------------------------------------- |
| ## ----------------------------------------------------------------------- |
| # test : venv-activate-script |
| test : $(venv-activate-script) |
| tox |
| |
| ## ----------------------------------------------------------------------- |
| ## ----------------------------------------------------------------------- |
| license: ## Check code for licensing with REUSE |
| reuse --root . lint |
| |
| ## ----------------------------------------------------------------------- |
| ## Intent: Show supported targets |
| ## ----------------------------------------------------------------------- |
| help :: ## Print help for each target |
| @echo |
| @echo "Usage: $(MAKE)" |
| @printf ' %-33.33s %s\n' 'cggs' 'Crowd Group Gerrit Sync' |
| @printf ' %-33.33s %s\n' 'test' 'Run all tests' |
| @printf ' %-33.33s %s\n' 'license'\ |
| 'Check code for licensing with REUSE' |
| |
| # [EOF] |