blob: ca1b2779e85227d5a58be530d4f12a241dce9e75 [file] [log] [blame]
Zack Williams7f87d3e2020-06-05 12:36:39 -07001# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
2# SPDX-License-Identifier: Apache-2.0
3
4SHELL = bash -e -o pipefail
5
6# Common set of args, set to --debug for more output
7COMMON_ARGS ?= --debug
8
9# change to be 'python3 -m cProfile -s cumtime' to profile a script
10PYTHON ?= python3
11
12.DEFAULT_GOAL := help
13.PHONY: cggs license clean-all help
14
15# build targets
16
17cggs: ## Sync crowd groups
18 $(PYTHON) cggs.py $(COMMON_ARGS) settings.json
19
20# testing targets
21test: ## run all tests
22 tox
23
24license: ## Check code for licensing with REUSE
25 reuse --root . lint
26
27clean-all: clean ## Delete virtualenv and all cached job information
28 rm -rf .tox *.pyc
29
30help: ## Print help for each target
31 @echo cggs test targets
32 @echo
33 @grep '^[[:alnum:]_-]*:.* ##' $(MAKEFILE_LIST) \
34 | sort | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s %s\n", $$1, $$2};'