-
Notifications
You must be signed in to change notification settings - Fork 71
/
Makefile
48 lines (39 loc) · 1.04 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
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) guides
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@rm -rf $(BUILDDIR)/json/_sources/
@rm -rf $(BUILDDIR)/json/*.pickle
@rm -rf $(BUILDDIR)/json/*.inv
@rm -rf $(BUILDDIR)/doctrees/
@rm -rf $(BUILDDIR)/json/_images/
@for file in `find $(BUILDDIR)/json/ -name "*.fjson"`; do \
sed -i 's/..\/..\/_images/\/img/g' $${file} ; \
done;
@echo
@echo "Build finished. The JSON pages are in $(BUILDDIR)/json."
tests:
expresso
deploy: tests
git push origin master
refresh:
git pull
dev: json
node app.js
clean:
@rm -rf $(BUILDDIR)/*
prod: refresh json
node server.js
env:
@virtualenv env && \
. env/bin/activate && \
pip install nodeenv sphinx && \
nodeenv --node=7.8.0 -p --prebuilt && \
npm install