-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMakefile
42 lines (30 loc) · 794 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# vim: ts=4 sw=4 noet
package = contrib/package.sh
test_env ?= AUTOMX2_CONF=tests/unittest.conf NETWORK_TESTS=1 RUN_LDAP_TESTS=0 PYTHONPATH=src
define usage
Available make targets:
clean Cleanup build artifacts.
dist Build distribution artifacts.
docs Generate documentation.
dtest Developer tests.
fmt Format Python code.
help Display this text.
shc Shell script care.
endef
.PHONY: clean dist docs dtest fmt help shc
help:
$(info $(usage))
@exit 0
clean:
rm -fr dist/* src/*.egg-info ./**/__pycache__
dtest:
$(test_env) coverage run --source automx2 -m unittest discover -v tests/
coverage html --rcfile=tests/coverage.rc
dist: clean docs
python -m build
docs:
$(package) $@
fmt:
black **/*.py
shc:
shcare contrib/*.sh || shellcheck -x contrib/*.sh