-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
66 lines (49 loc) · 1.93 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
all: dependencies gen parser
rm -rf build/ # Remove previous build files
python3 setup.py build_ext -i
parser:
java -jar antlr-4.9.3-complete.jar -Dlanguage=Python3 -visitor Harmony.g4 -o harmony_model_checker/parser -no-listener
dependencies:
pip3 install -r requirements.txt
gen:
printf "\n__package__ = \"harmony_model_checker\"\n" > harmony_model_checker/__init__.py
printf "__version__ = \"1.2.%d\"\n" `git log --pretty=format:'' | wc -l | sed 's/[ \t]//g'` >> harmony_model_checker/__init__.py
chmod +x harmony
charm:
gcc -Iharmony_model_checker/charm -Iharmony_model_checker/charm/iface -o charm.exe -pthread harmony_model_checker/charm/*.c harmony_model_checker/charm/iface/*.c
behavior: x.hny
./harmony -o x.hny
: ./harmony -mqueue=queueconc code/qtestconc4.hny
: ./harmony code/qtestconc4.hny
: python3 behavior.py -Tdot -M x.hco
open x.png
iface: iface.py iface.json
./harmony -i 'countLabel(cs)' code/csonebit.hny
: ./harmony -i 'countLabel(cs)' code/Peterson.hny
: ./harmony -i '(flags,turn)' code/Peterson.hny
: ./harmony -i rw code/RWtest.hny
python3 iface.py iface.json > x.gv
dot -Tpdf x.gv > x.pdf
open x.pdf
dist: gen parser
rm -rf build/ dist/ harmony_model_checker.egg-info/
python3 setup.py sdist
upload-test: dist
twine upload -r testpypi dist/*
upload: dist
twine upload dist/*
test-unit:
coverage run -m unittest discover tests/harmony
test-e2e:
coverage run -m unittest discover tests/e2e
test: test-unit test-e2e
clean:
# Harmony outputs in `code` directory
rm -f code/*.htm code/*.hvm code/*.hco code/*.png code/*.hfa code/*.tla code/*.gv *.html
# Harmony outputs in `modules` directory
(cd harmony_model_checker/modules; rm -f *.htm *.hvm *.hco *.png *.hfa *.tla *.gv *.html)
rm -rf compiler_integration_results.md compiler_integration_results/
# Package publication related outputs
rm -rf build/ dist/ harmony_model_checker.egg-info/
# Test coverage related outputs
rm -rf .coverage htmlcov