38 lines
1.0 KiB
Makefile
38 lines
1.0 KiB
Makefile
# Minimal makefile for Sphinx documentation
|
|
#
|
|
|
|
# You can set these variables from the command line.
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
SPHINXOPTS =
|
|
SPHINXBUILD = sphinx-build
|
|
SPHINXPRJ = $(shell basename `dirname \`pwd\``)
|
|
SOURCEDIR = .
|
|
BUILDDIR = _build
|
|
|
|
# Put it first so that "make" without argument is like "make help".
|
|
help:
|
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
|
|
.PHONY: help Makefile
|
|
|
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
%: $(SPHINXPRJ)
|
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
|
|
$(SPHINXPRJ): Makefile
|
|
make -C $@/_examples_ all
|
|
|
|
clean:
|
|
@echo "\033[1;33mCleanung up docs...\033[00m"
|
|
@echo "\e[1m * Sphix build directory...\e[0m"
|
|
@rm -rf $(BUILDDIR)/*
|
|
@make -kC $(SPHINXPRJ)/_examples_ clean
|
|
|
|
release: html
|
|
rm -rf $(SPHINXPRJ)/_docs_
|
|
mv $(BUILDDIR)/html $(SPHINXPRJ)/_docs_
|
|
|
|
view_html: html
|
|
xdg-open $(BUILDDIR)/html/index.html
|