esphome-docs/Makefile

50 lines
1.4 KiB
Makefile
Raw Normal View History

ESPHOME_CORE_PATH = ../esphome-core
2019-02-26 23:04:46 +01:00
ESPHOME_CORE_TAG = v1.11.2
2018-05-13 11:37:02 +02:00
.PHONY: html cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png
2018-05-13 11:37:02 +02:00
html:
2019-02-26 19:37:31 +01:00
sphinx-build -M html . _build -W $(O)
2018-06-07 19:29:35 +02:00
cleanhtml:
rm -rf "_build/html/*"
2018-05-13 11:37:02 +02:00
svg2png:
python3 svg2png.py
2018-06-07 19:29:35 +02:00
help:
sphinx-build -M help . _build $(O)
2018-06-07 19:29:35 +02:00
api:
mkdir -p _build/html/api
@if [ ! -d "$(ESPHOME_CORE_PATH)" ]; then \
git clone --branch $(ESPHOME_CORE_TAG) https://github.com/esphome/esphome-core.git $(ESPHOME_CORE_PATH); \
fi
ESPHOME_CORE_PATH=$(ESPHOME_CORE_PATH) doxygen Doxygen
2018-05-14 21:15:49 +02:00
netlify-api: netlify-dependencies
mkdir -p _build/html/api
@if [ ! -d "$(ESPHOME_CORE_PATH)" ]; then \
git clone --branch $(ESPHOME_CORE_TAG) https://github.com/esphome/esphome-core.git $(ESPHOME_CORE_PATH); \
2018-08-27 13:21:30 +02:00
fi
ESPHOME_CORE_PATH=$(ESPHOME_CORE_PATH) ../doxybin/doxygen Doxygen
2018-08-27 13:21:30 +02:00
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
2019-02-11 14:36:19 +01:00
python3 travis.py
2018-05-13 11:37:02 +02:00
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
sphinx-build -M $@ . _build $(O)