Release 0.8.0
[pylit.git] / doc / Makefile
blob5e108be1ca226dd16bd947d572841b7980811e8e
1 # Makefile for Sphinx documentation
4 # You can set these variables from the command line.
5 SPHINXOPTS = -q
6 SPHINXBUILD = sphinx-build
8 INDIR = .
9 HTMLDIR = build/html
10 PAGESDIR = ../pages/PyLit
12 # Internal variables.
13 ALLSPHINXOPTS = -d build/doctrees $(SPHINXOPTS) $(INDIR)
15 .PHONY: examples help clean html web pickle htmlhelp latex changes linkcheck pages
17 logo/pylit-bold-framed.png: logo/pylit-bold-framed.svg
18 inkscape --export-png=logo/pylit-bold-framed.png logo/pylit-bold-framed.svg
20 examples/pylit.py.txt: ../pylit.py
21 pylit ../pylit.py examples/pylit.py.txt
23 examples/pylit_test.py.txt: ../test/pylit_test.py
24 pylit --comment-string='## ' ../test/pylit_test.py examples/pylit_test.py.txt
26 examples/conf.py.txt: conf.py
27 pylit conf.py examples/conf.py.txt
29 examples: examples/pylit.py.txt examples/pylit_test.py.txt examples/conf.py.txt
31 help:
32 @echo "Please use \`make <target>' where <target> is one of"
33 @echo " html to make standalone HTML files"
34 @echo " pickle to make pickle files"
35 @echo " json to make JSON files"
36 @echo " htmlhelp to make HTML files and a HTML help project"
37 @echo " latex to make LaTeX files"
38 @echo " changes to make an overview over all changed/added/deprecated items"
39 @echo " linkcheck to check all external links for integrity"
40 @echo " pages to move the HTML files to ../pages/PyLit/"
42 clean:
43 -rm -rf build/*
45 html: examples logo/pylit-bold-framed.png
46 echo $(INDIR)
47 mkdir -p $(HTMLDIR) build/doctrees
48 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLDIR)
49 @echo
50 @echo "Copying some source files"
51 cp $(INDIR)/download/pylit $(HTMLDIR)/download/
52 cp $(INDIR)/examples/*.txt $(HTMLDIR)/examples/
53 cp $(INDIR)/examples/*.py $(HTMLDIR)/examples/
54 cp $(INDIR)/examples/*.sty $(HTMLDIR)/examples/
55 # cp $(INDIR)/examples/*.css $(HTMLDIR)/examples/
56 cp $(INDIR)/tutorial/*.py $(HTMLDIR)/tutorial/
57 cp $(INDIR)/tutorial/*.py.txt $(HTMLDIR)/tutorial/
59 @echo
60 @echo "Build finished. The HTML pages are in $(HTMLDIR)."
62 pickle:
63 mkdir -p build/pickle build/doctrees
64 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
65 @echo
66 @echo "Build finished; now you can process the pickle files."
68 web: pickle
70 json:
71 mkdir -p build/json build/doctrees
72 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
73 @echo
74 @echo "Build finished; now you can process the JSON files."
76 htmlhelp:
77 mkdir -p build/htmlhelp build/doctrees
78 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
79 @echo
80 @echo "Build finished; now you can run HTML Help Workshop with the" \
81 ".hhp project file in build/htmlhelp."
83 latex:
84 mkdir -p build/latex build/doctrees
85 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
86 @echo
87 @echo "Build finished; the LaTeX files are in build/latex."
88 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
89 "run these through (pdf)latex."
91 changes:
92 mkdir -p build/changes build/doctrees
93 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
94 @echo
95 @echo "The overview file is in build/changes."
97 linkcheck:
98 mkdir -p build/linkcheck build/doctrees
99 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
100 @echo
101 @echo "Link check complete; look for any errors in the above output " \
102 "or in build/linkcheck/output.txt."
104 pages: html
105 cp $(HTMLDIR)/*.html $(HTMLDIR)/*.js $(PAGESDIR)
106 cp -r $(HTMLDIR)/_static $(HTMLDIR)/download \
107 $(HTMLDIR)/examples $(HTMLDIR)/tutorial $(PAGESDIR)