Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (32 sloc) 1.18 KB
# MakeFile for building all the docs at once.
# Inspired by the Makefile used by bazaar.
PYTHON = python
.PHONY: all clean html latexpdf epub htmlhelp
# Languages that can be built.
LANGS = en pt
# Dependencies to perform before running other builds.
SPHINX_DEPENDENCIES = $(foreach lang, $(LANGS), $(lang)/Makefile)
# Copy-paste the english Makefile everwhere its needed.
%/Makefile : en/Makefile
$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
# The various formats the documentation can be created in.
# Loop over the possible languages and call other build targets.
html: $(foreach lang, $(LANGS), html-$(lang))
htmlhelp: $(foreach lang, $(LANGS), htmlhelp-$(lang))
epub: $(foreach lang, $(LANGS), epub-$(lang))
latexpdf: $(foreach lang, $(PDF_LANGS), latex-$(lang))
# Make the HTML version of the documentation with correctly nested language folders.
cd $* && make html LANG=$*
cd $* && make htmlhelp LANG=$*
cd $* && make epub LANG=$*
cd $* && make latexpdf LANG=$*
rm -rf build/*