forked from spookey/ffflash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
55 lines (41 loc) · 1.03 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
# Makefile for development purposes only
DOCDIR = docs
FFFLASHDIR = ffflash
TESTDIR = tests
HTMLCOVDIR = htmlcov
PYTEST = py.test
WATCH = watchmedo shell-command --recursive --wait --patterns="*.py;*.rst" --command="$(MAKE) MKCMD"
BROWSE = python3 -c "import webbrowser; webbrowser.open_new_tab('URL')"
.rmdocs:
$(MAKE) -C $(DOCDIR) clean
.docs:
$(MAKE) -C $(DOCDIR) html
.rmcov:
rm -rvf $(HTMLCOVDIR) .coverage
.cov:
$(PYTEST) --cov-report=html --cov=$(FFFLASHDIR) $(TESTDIR)
.test:
$(PYTEST) -vss $(TESTDIR)
all: .docs .cov
clean: .rmdocs .rmcov
find . -name '__pycache__' -delete -print -o -name '*.pyc' -delete -print
new: clean all
loop: all
$(subst MKCMD,all,$(WATCH))
test: .test
ltest: test
$(subst MKCMD,test,$(WATCH))
docs: .docs
rmdocs: .rmdocs
newdocs: .rmdocs .docs
hdocs: .docs
$(subst URL,$(DOCDIR)/_build/html/index.html,$(BROWSE))
ldocs: .docs
$(subst MKCMD,docs,$(WATCH))
cov: .cov
rmcov: .rmcov
newcov: .rmcov .cov
hcov: .cov
$(subst URL,$(HTMLCOVDIR)/index.html,$(BROWSE))
lcov: .cov
$(subst MKCMD,cov,$(WATCH))