esphome-docs/Makefile

47 lines
1.2 KiB
Makefile
Raw Normal View History

2018-05-13 11:37:02 +02:00
# 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
2019-01-09 16:16:09 +01:00
ESPHOMELIB_TAG = v1.10.0b2
2018-05-13 11:37:02 +02:00
2018-08-27 13:21:30 +02:00
.PHONY: html cleanhtml doxyg cleandoxyg deploy help webserver Makefile $(ESPHOMELIB_PATH)
2018-06-07 19:29:35 +02:00
html: _doxyxml
2018-05-13 11:37:02 +02:00
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2018-06-09 09:58:58 +02:00
cleanhtml: cleandoxyg
2018-06-07 19:29:35 +02:00
rm -rf "$(BUILDDIR)/html/*"
2018-05-13 11:37:02 +02:00
2018-06-07 19:29:35 +02:00
doxyg: cleandoxyg _doxyxml
cleandoxyg:
rm -rf _doxyxml
2018-10-12 16:33:22 +02:00
_doxyxml:
2018-05-14 21:15:49 +02:00
ESPHOMELIB_PATH=$(ESPHOMELIB_PATH) doxygen Doxygen
2018-08-27 13:21:30 +02:00
$(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
2018-05-13 11:37:02 +02:00
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)