-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
97 lines (79 loc) · 1.99 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
#!/usr/bin/make -f
# 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 and is in the public domain. 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
PYTHON3 ?= $(shell which python3 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6)
ifeq ($(PYTHON3),)
$(error Python 3 not found)
endif
VIRTUALENV ?= $(shell which virtualenv-3.8 2>/dev/null || which virtualenv-3.7 2>/dev/null || which virtualenv-3.6 2>/dev/null || which virtualenv)
ifeq ($(VIRTUALENV),)
$(error virtualenv not found)
endif
all:
.PHONY: \
check-docs \
docs \
docs-figs \
docs-tests
.git_submodule_init.done.log: \
.git_submodule_init-dfxml.done.log
touch $@
.git_submodule_init-dfxml.done.log:
git submodule init deps/dfxml
git submodule update deps/dfxml
pushd deps/dfxml ; \
make schema-init
touch $@
.venv.done.log: \
.git_submodule_init.done.log \
requirements.txt
$(VIRTUALENV) \
--python=$(PYTHON3) \
venv
source venv/bin/activate ; \
pip install \
-r requirements.txt
touch $@
check: \
.venv.done.log
$(MAKE) \
--directory tests \
check
check-docs: \
check-docs-figs \
check-docs-tests
check-docs-figs:
$(MAKE) \
--directory figs \
check
check-docs-tests: \
.venv.done.log
$(MAKE) \
--directory tests \
check-docs
clean:
@rm -rf venv
@rm -f .*.done.log
@$(MAKE) --directory figs clean
@$(MAKE) --directory tests clean
docs: \
docs-figs \
docs-tests
docs-figs:
$(MAKE) \
--directory figs
docs-tests:
$(MAKE) \
--directory tests \
docs
download: \
.venv.done.log