-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (48 loc) · 1.77 KB
/
Makefile
File metadata and controls
74 lines (48 loc) · 1.77 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.PHONY: test doc-test tags dist
export PROJECT := tuxmake
include $(shell tuxpkg get-makefile)
ALL_TESTS_PASSED = ======================== All tests passed ========================
all: typecheck codespell style unit-tests integration-tests docker-build-tests man doc bash_completion
@printf "\033[01;32m$(ALL_TESTS_PASSED)\033[m\n"
unit-tests:
python3 -m pytest --cov=tuxmake --cov-report=term-missing --cov-fail-under=100 test
style:
black --check --diff .
flake8 .
typecheck:
mypy tuxmake
codespell:
codespell \
--check-filenames \
--skip '.git,public,dist,*.sw*,*.pyc,tags,*.json,.coverage,htmlcov,*.1,*.log,code-of-conduct.md,*.sha256sum'
RUN_TESTS = scripts/run-tests
integration-tests:
$(RUN_TESTS) test/integration
integration-tests-docker:
$(RUN_TESTS) test/integration-slow/docker*
docker-build-tests:
$(MAKE) -C support/docker test
man: tuxmake.1
tuxmake.1: tuxmake.rst cli_options.rst
rst2man tuxmake.rst $@
bash_completion: bash_completion/tuxmake
bash_completion/tuxmake: tuxmake/cmdline.py $(wildcard tuxmake/*/*.ini)
mkdir -p $$(dirname $@)
python3 -m tuxmake.cmdline bash_completion > $@ || ($(RM) $@; false)
cli_options.rst: tuxmake/cli.py scripts/cli2rst.sh tuxmake/cmdline.py
scripts/cli2rst.sh $@
docs/cli.md: tuxmake.rst tuxmake/cli.py scripts/cli2md.sh scripts/cli2md.py
scripts/cli2md.sh $@
docs/index.md: README.md scripts/readme2index.sh
scripts/readme2index.sh $@
doc: doc-test public
doc-test:
python3 -m pytest scripts/test_doc.py
public: docs/cli.md docs/index.md $(wildcard docs/*)
PYTHONPATH=. mkdocs build
serve-public: public
mkdocs serve --livereload --strict
tags:
ctags --exclude=public --exclude=.mypy_cache --exclude=tmp -R
clean::
$(RM) -r tuxmake.1 cli_options.rst docs/cli.md docs/index.md public/ tags bash_completion/