kivy/doc/Makefile

138 lines
3.8 KiB
Makefile
Raw Normal View History

2010-11-03 21:05:03 +00:00
# Makefile for Sphinx documentation
#
ENDUSER_BUILD = yes
2010-11-03 21:05:03 +00:00
# You can set these variables from the command line.
2015-01-24 15:26:14 +00:00
PYTHON = python
SPHINXOPTS = -Q
SPHINXOPTS_TEST = -W -T
2015-01-24 15:26:14 +00:00
SPHINXBUILD = sphinx-build
PAPER =
2010-11-03 21:05:03 +00:00
2014-02-23 00:07:30 +00:00
# platform indepnt path separator
# only system calls need to use $(P), b/c on win system calls have issues with /
ifdef ComSpec
PATHSEP2=\\
MKDIR=mkdir
else
PATHSEP2=/
MKDIR=mkdir -p
endif
P=$(strip $(PATHSEP2))
2010-11-03 21:05:03 +00:00
# Internal variables.
2015-01-24 15:26:14 +00:00
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sources
ALLSPHINXOPTS_TEST = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS_TEST) sources
ALLSPHINXOPTSGT = -d build/doctrees_gettext $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sources
ALLSPHINXOPTSGT_TEST = -d build/doctrees_gettext $(PAPEROPT_$(PAPER)) $(SPHINXOPTS_TEST) sources
2010-11-03 21:05:03 +00:00
ifeq ($(ENDUSER_BUILD),yes)
_TESTS =
else
_TESTS = _TEST
endif
2011-10-04 13:59:11 +00:00
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck gettext
2010-11-03 21:05:03 +00:00
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " pickle to make pickle files (usable by e.g. sphinx-web)"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " pdf to make standalone PDF files"
@echo " ps to make standalone PS files"
2010-11-03 21:05:03 +00:00
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
clean:
2014-02-23 00:07:30 +00:00
# windows just doesn't support e.g. build\*
ifdef ComSpec
-rmdir /s /q build
else
2010-11-03 21:05:03 +00:00
-rm -rf build/*
2014-02-23 00:07:30 +00:00
endif
2010-11-03 21:05:03 +00:00
html:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)html build$(P)doctrees
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS$(_TESTS)) build/html
2010-11-03 21:05:03 +00:00
@echo
@echo "Build finished. The HTML pages are in build/html."
2011-10-04 13:59:11 +00:00
gettext:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)html build$(P)doctrees_gettext
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b gettext $(ALLSPHINXOPTSGT$(_TESTS)) build/gettext
2011-10-04 13:59:11 +00:00
@echo
@echo "Build finished. The Gettext pages are in build/gettext."
2010-11-03 21:05:03 +00:00
pickle:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)pickle build$(P)doctrees
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS$(_TESTS)) build/pickle
2010-11-03 21:05:03 +00:00
@echo
@echo "Build finished; now you can process the pickle files or run"
@echo " sphinx-web build/pickle"
@echo "to start the sphinx-web server."
web: pickle
htmlhelp:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)htmlhelp build$(P)doctrees
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS$(_TESTS)) build/htmlhelp
2010-11-03 21:05:03 +00:00
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in build/htmlhelp."
latex:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)latex build$(P)doctrees
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS$(_TESTS)) build/latex
2010-11-03 21:05:03 +00:00
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' to" \
2010-11-03 21:05:03 +00:00
"run these through (pdf)latex."
pdf: latex
$(MAKE) -C build$(P)latex all-pdf
@echo
@echo "Build finished; the PDF files are in build/latex."
ps: latex
$(MAKE) -C build$(P)latex all-ps
@echo
@echo "Build finished; the PS files are in build/latex."
2010-11-03 21:05:03 +00:00
changes:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)changes build$(P)doctrees
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS$(_TESTS)) build/changes
2010-11-03 21:05:03 +00:00
@echo
@echo "The overview file is in build/changes."
linkcheck:
2014-02-23 00:07:30 +00:00
$(MKDIR) build$(P)linkcheck build$(P)doctrees
$(PYTHON) autobuild.py
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS$(_TESTS)) build/linkcheck
2010-11-03 21:05:03 +00:00
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in build/linkcheck/output.txt."
enable-ENDUSER_BUILD:
$(ENDUSER_BUILD) = yes
$(_TESTS) =
disable-ENDUSER_BUILD:
$(ENDUSER_BUILD) = no
$(_TESTS) = _TEST
build-all: html pickle htmlhelp pdf ps gettext
test: disable-ENDUSER_BUILD build-all