-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
95 lines (83 loc) · 1.97 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
#!/usr/bin/make -f
# Portions of this file contributed by NIST are governed by the
# following statement:
#
# This software was developed at the National Institute of Standards
# and Technology by employees of the Federal Government in the course
# of their official duties. Pursuant to Title 17 Section 105 of the
# United States Code, this software is not subject to copyright
# protection within the United States. NIST assumes no responsibility
# whatsoever for its use by other parties, and makes no guarantees,
# expressed or implied, about its quality, reliability, or any other
# characteristic.
#
# We would appreciate acknowledgement if the software is used.
SHELL := /bin/bash
all: \
check-examples
source venv/bin/activate \
&& case_viewer \
examples/WirelessNetworkConnection.json
.PHONY: \
check-examples
.dry_run.done.log: \
.pytest.done.log
source venv/bin/activate \
&& case_viewer \
--dry-run \
examples/WirelessNetworkConnection.json
touch $@
.mypy_strict.done.log: \
.venv.done.log \
case_viewer/lib.py
source venv/bin/activate \
&& poetry run mypy \
--strict \
case_viewer/lib.py
touch $@
.mypy.done.log: \
.mypy_strict.done.log \
case_viewer/case_viewer.py
source venv/bin/activate \
&& poetry run mypy \
case_viewer/case_viewer.py
touch $@
.pytest.done.log: \
.mypy.done.log
source venv/bin/activate \
&& poetry run pytest \
--doctest-modules \
case_viewer/lib.py
touch $@
.venv.done.log: \
pyproject.toml
rm -f poetry.lock
rm -rf venv
python3 -m venv venv
source venv/bin/activate \
&& pip install \
--upgrade \
pip \
poetry
source venv/bin/activate \
&& poetry install
source venv/bin/activate \
&& pip install \
case-utils
touch $@
check: \
.dry_run.done.log \
check-examples
check-examples: \
.venv.done.log
$(MAKE) \
--directory examples \
check
clean:
@$(MAKE) \
--director examples \
clean
@rm -f \
.*.done.log
@rm -rf \
venv