Merge pull request #197 from piyushbansal/master
[e_cidadania.git] / docs / Makefile
blob11550b3775975a15ef403142c4e3ba988fdb0d1a
1 # Makefile for Sphinx documentation
4 PYTHON = python
6 .PHONY: all clean html latex latexpdf
8 # You can set these variables from the command line.
9 SPHINXOPTS =
10 SPHINXBUILD = sphinx-build
11 PAPER =
12 BUILDDIR = build
14 # Internal variables.
15 PAPEROPT_a4 = -D latex_paper_size=a4paper
16 PAPEROPT_letter = -D latex_paper_size=letter
17 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees/$(LANG) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19 SPHINX_DEPENDENCIES = en/Makefile
21 #%/Makefile : en/Makefile
22 # $(PYTHON) -c "import shutil; shutil.copyfile('$<, '$@')"
24 # Take in mind that the english is the last to build. This is for readthedocs.org
25 # to get the english docs instead of spanish or galician.
27 help:
28 @echo "Please use \`make <target>' where <target> is one of the supported formats by e-cidadania:"
29 @echo
30 @echo " html Make the HTML version of the documentation"
31 @echo " latex Make the LaTeX version of the documentation"
32 @echo " latexpdf Create the PDF version of the documentation using pdflatex"
33 @echo
34 @echo "This Makefile will generate the documentation for the three official languages of e-cidadania: Spanish, English and Galician."
35 @echo "If you want to build just one of them please use the Makefile inside the language directory."
36 @echo
38 html: $(SPHINX_DEPENDENCIES)
39 cd en && make html LANG=en
40 cd es && make html LANG=es
41 cd gl && make html LANG=gl
43 latex: $(SPHINX_DEPENDENCIES)
44 cd gl && make latex LANG=gl
45 cd es && make latex LANG=es
46 cd en && make latex LANG=en
48 latexpdf: $(SPHINX_DEPENDENCIES)
49 cd es && make latexpdf LANG=es
50 cd en && make latexpdf LANG=en
51 cd gl && make latexpdf LANG=gl
53 clean:
54 rm -rf $(BUILDDIR)
55 @echo "The build directory has been removed."