forked from esphome/esphome-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (40 loc) · 1.44 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
ESPHOME_PATH = ../esphome
ESPHOME_REF = v1.14.3
.PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png
html:
sphinx-build -M html . _build -j auto -n $(O)
html-strict:
sphinx-build -M html . _build -W -j auto -n $(O)
cleanhtml:
rm -rf "_build/html/*"
svg2png:
python3 svg2png.py
help:
sphinx-build -M help . _build $(O)
api:
mkdir -p _build/html/api
@if [ ! -d "$(ESPHOME_PATH)" ]; then \
git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH); \
fi
ESPHOME_PATH=$(ESPHOME_PATH) doxygen Doxygen
netlify-api: netlify-dependencies
mkdir -p _build/html/api
@if [ ! -d "$(ESPHOME_PATH)" ]; then \
git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH); \
fi
ESPHOME_PATH=$(ESPHOME_PATH) ../doxybin/doxygen Doxygen
netlify-dependencies:
mkdir -p ../doxybin
curl -L https://github.com/esphome/esphome-docs/releases/download/v1.10.1/doxygen-1.8.13.xz | xz -d >../doxybin/doxygen
chmod +x ../doxybin/doxygen
copy-svg2png:
cp svg2png/*.png _build/html/_images/
netlify: netlify-dependencies netlify-api html copy-svg2png
webserver: html
cd "_build/html" && python3 -m http.server
lint: html-strict
python3 travis.py
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
sphinx-build -M $@ . _build $(O)