apply patch from bugreport #16193: dont copy files that dont exist
[pylit.git] / Makefile
blobd2596d894dce76e660fcb2636986391dd68b852b
1 # Makefile for Sphinx documentation
4 # You can set these variables from the command line.
5 SPHINXOPTS = -q
6 SPHINXBUILD = sphinx-build
8 INDIR = rstdocs
9 HTMLDIR = build/html
11 # Internal variables.
12 ALLSPHINXOPTS = -d build/doctrees $(SPHINXOPTS) $(INDIR)
14 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck
16 help:
17 @echo "Please use \`make <target>' where <target> is one of"
18 @echo " html to make standalone HTML files"
19 @echo " pickle to make pickle files"
20 @echo " json to make JSON files"
21 @echo " htmlhelp to make HTML files and a HTML help project"
22 @echo " latex to make LaTeX files"
23 @echo " changes to make an overview over all changed/added/deprecated items"
24 @echo " linkcheck to check all external links for integrity"
26 clean:
27 -rm -rf build/*
29 html:
30 mkdir -p $(HTMLDIR) build/doctrees
31 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLDIR)
32 @echo
33 @echo "Copying some source files"
34 cp $(INDIR)/download/pylit $(HTMLDIR)/download/
35 cp $(INDIR)/examples/*.txt $(HTMLDIR)/examples/
36 cp $(INDIR)/examples/*.py $(HTMLDIR)/examples/
37 # cp $(INDIR)/examples/*.sty $(HTMLDIR)/examples/
38 # cp $(INDIR)/examples/*.css $(HTMLDIR)/examples/
39 cp $(INDIR)/tutorial/*.py $(HTMLDIR)/tutorial/
40 cp $(INDIR)/tutorial/*.py.txt $(HTMLDIR)/tutorial/
42 @echo
43 @echo "Build finished. The HTML pages are in $(HTMLDIR)."
45 pickle:
46 mkdir -p build/pickle build/doctrees
47 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
48 @echo
49 @echo "Build finished; now you can process the pickle files."
51 web: pickle
53 json:
54 mkdir -p build/json build/doctrees
55 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
56 @echo
57 @echo "Build finished; now you can process the JSON files."
59 htmlhelp:
60 mkdir -p build/htmlhelp build/doctrees
61 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
62 @echo
63 @echo "Build finished; now you can run HTML Help Workshop with the" \
64 ".hhp project file in build/htmlhelp."
66 latex:
67 mkdir -p build/latex build/doctrees
68 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
69 @echo
70 @echo "Build finished; the LaTeX files are in build/latex."
71 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
72 "run these through (pdf)latex."
74 changes:
75 mkdir -p build/changes build/doctrees
76 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
77 @echo
78 @echo "The overview file is in build/changes."
80 linkcheck:
81 mkdir -p build/linkcheck build/doctrees
82 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
83 @echo
84 @echo "Link check complete; look for any errors in the above output " \
85 "or in build/linkcheck/output.txt."