-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
53 lines (37 loc) · 969 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
43
44
45
46
47
48
49
50
51
52
53
# vim:ts=4:noet
package = contrib/package.sh
unittest = contrib/unittest.sh
subdirs = docs
define usage
The following make targets are available:
clean Cleanup build directories.
dist Build distribution files.
help Show this text.
push Push to all configured Git remotes.
pypi Upload distribution files to PyPI.
schk Shell script check.
stest Run sandboxed Python tests (disables network tests).
test Run all Python tests and generate coverage report.
endef
.PHONY: subdirs $(subdirs) clean dist help pypi stest test
subdirs: $(subdirs)
$(subdirs):
make -C $@
help:
$(info $(usage))
@exit 0
clean:
find tmp -type f -delete
$(package) clean
dist:
$(package) dist
pypi:
@echo "# Run this command to upload:\n$(package) pypi"
stest:
env NETWORK_TESTS=0 $(unittest)
test:
env NETWORK_TESTS=1 $(unittest) coverage
push:
for _r in $(shell git remote); do git push $$_r; done; unset _r
schk:
shellcheck -x contrib/*.sh