forked from esphome/esphome-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 1.19 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
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = esphomelib
SOURCEDIR = .
BUILDDIR = _build
ESPHOMELIB_PATH = ../esphomelib
ESPHOMELIB_TAG = v1.9.3
CNAME = esphomelib.com
.PHONY: html cleanhtml doxyg cleandoxyg deploy help webserver Makefile $(ESPHOMELIB_PATH)
html: _doxyxml
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
cleanhtml: cleandoxyg
rm -rf "$(BUILDDIR)/html/*"
doxyg: cleandoxyg _doxyxml
cleandoxyg:
rm -rf _doxyxml
_doxyxml:
ESPHOMELIB_PATH=$(ESPHOMELIB_PATH) doxygen Doxygen
$(ESPHOMELIB_PATH):
@if [ ! -d "$(ESPHOMELIB_PATH)" ]; then \
git clone --branch $(ESPHOMELIB_TAG) https://github.com/OttoWinter/esphomelib.git $(ESPHOMELIB_PATH); \
fi
convertimages:
python3 svg2png.py
help:
$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
webserver: html
cd "$(BUILDDIR)/html" && python3 -m http.server
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)