blob: ca1b2779e85227d5a58be530d4f12a241dce9e75 [file] [log] [blame]
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
SHELL = bash -e -o pipefail
# Common set of args, set to --debug for more output
COMMON_ARGS ?= --debug
# 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: ## Sync crowd groups
$(PYTHON) cggs.py $(COMMON_ARGS) settings.json
# testing targets
test: ## run all tests
tox
license: ## Check code for licensing with REUSE
reuse --root . lint
clean-all: clean ## Delete virtualenv and all cached job information
rm -rf .tox *.pyc
help: ## Print help for each target
@echo cggs test targets
@echo
@grep '^[[:alnum:]_-]*:.* ##' $(MAKEFILE_LIST) \
| sort | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s %s\n", $$1, $$2};'