-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
42 lines (30 loc) · 820 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=.
define usage
Available make targets:
clean Cleanup build artifacts
dist Build distribution artifacts
docs Generate documentation
dtest Developer tests
help Display this text
push Push to all configured Git remotes
schk Shell script check
endef
.PHONY: clean dtest dist docs help push schk
help:
$(info $(usage))
@exit 0
clean:
$(package) clean || true
dtest:
$(test_env) coverage run --source automx2 -m unittest discover -v tests/
coverage html --rcfile=tests/coverage.rc
dist:
$(package) dist
docs:
$(package) docs
push:
for _r in $(shell git remote); do git push $$_r; done; unset _r
schk:
shellcheck -e SC2155 -x contrib/*.sh