-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
113 lines (92 loc) · 2.84 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.PHONY: docs test style lint package
lint: style
@python3 -m pylint --rcfile=pylint3.cfg \
--reports=no \
trlc trlc*.py lobster-*.py
style:
@python3 -m pycodestyle trlc trlc*.py lobster-*.py
test: unit-tests system-tests
make coverage
util/check_local_modifications.sh
test-all: unit-tests system-tests-all
make coverage
util/check_local_modifications.sh
coverage:
coverage combine -q
coverage html --rcfile=coverage.cfg
coverage report --rcfile=coverage.cfg --fail-under=94
unit-tests:
coverage run -p \
--branch --rcfile=coverage.cfg \
--data-file .coverage \
-m unittest discover -s tests-unit -v
system-tests:
mkdir -p docs
coverage run -p --rcfile=coverage.cfg --branch --data-file .coverage \
./trlc-lrm-generator.py
make -C tests-system -B -j8 fast
make -C tests-large-partial -B -j8 fast
system-tests-all:
mkdir -p docs
coverage run -p --rcfile=coverage.cfg --branch --data-file .coverage \
./trlc-lrm-generator.py
make -C tests-system -B -j8 all
make -C tests-large-partial -B -j8 all
docs:
rm -rf docs
mkdir docs
cp documentation/assets/bmw_favicon.ico docs/
@util/rebuild_old_lrm.sh
@python3 trlc-lrm-generator.py --tag
@python3 -m util.mk_ast_hierarchy | \
dot -Tsvg > docs/ast_hierarchy.svg
@python3 -m util.mk_parser_hierarchy | \
dot -Tsvg > docs/parser_hierarchy.svg
@-make tracing
@sphinx-build -c sphinx -b html . docs
package:
@git clean -xdf
@python3 -m build
upload-main: package
python3 -m twine upload --repository pypi dist/*
remove-dev:
python3 -m util.release
github-release:
git push
python3 -m util.github_release
bump:
python3 -m util.bump_version_post_release
full-release:
make remove-dev
git push
make github-release
make bump
git push
requirements.lobster: language-reference-manual/lobster-trlc.conf \
language-reference-manual/lrm.rsl \
language-reference-manual/lrm.trlc
lobster-trlc \
--config-file=language-reference-manual/lobster-trlc.conf \
--out requirements.lobster \
language-reference-manual
code.lobster: $(wildcard trlc/*.py)
lobster-python --out code.lobster trlc
unit-tests.lobster: $(wildcard tests-unit/*.py)
lobster-python --activity --out unit-tests.lobster tests-unit
system-tests.lobster: $(wildcard tests-system/*/*.rsl) \
$(wildcard tests-system/*/*.trlc) \
$(wildcard tests-system/*/tracing)
python3 lobster-trlc-system-test.py
report.lobster: lobster.conf \
requirements.lobster \
code.lobster \
system-tests.lobster \
unit-tests.lobster
lobster-report \
--lobster-config=lobster.conf \
--out=report.lobster
lobster-online-report report.lobster
tracing: report.lobster
mkdir -p docs
lobster-html-report report.lobster --out=docs/tracing.html
lobster-ci-report report.lobster