1 MKHTMLOPTS=--doctype book --param toc.section.depth=1 --target html --stylesheet standard |
1 MKHTML=mkdoc |
|
2 MKHTMLOPTS=--doctype article --target html --stylesheet standard |
2 SRC=. |
3 SRC=. |
3 |
|
4 MKPDFOPTS=--doctype book --param toc.section.depth=2 --target pdf --stylesheet standard |
|
5 |
4 |
6 TXTFILES:= $(wildcard *.txt) |
5 TXTFILES:= $(wildcard *.txt) |
7 TARGET := $(TXTFILES:.txt=.html) |
6 TARGET := $(TXTFILES:.txt=.html) |
8 |
7 |
9 all: index.html |
8 # You can set these sphinx variables from the command line. |
|
9 SPHINXOPTS = |
|
10 SPHINXBUILD = sphinx-build |
|
11 PAPER = |
10 |
12 |
11 index.html: *.txt |
13 # Internal variables for sphinx |
12 mkdoc ${MKHTMLOPTS} index.txt |
14 PAPEROPT_a4 = -D latex_paper_size=a4 |
|
15 PAPEROPT_letter = -D latex_paper_size=letter |
|
16 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
13 |
17 |
14 index.pdf: *.txt |
18 |
15 mkdoc ${MKPDFOPTS} index.txt |
19 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck |
|
20 |
|
21 help: |
|
22 @echo "Please use \`make <target>' where <target> is one of" |
|
23 @echo " all to make standalone HTML files, developer manual and API doc" |
|
24 @echo " apidoc to make API doc" |
|
25 @echo " html to make standalone HTML files" |
|
26 @echo "--- " |
|
27 @echo " pickle to make pickle files (usable by e.g. sphinx-web)" |
|
28 @echo " htmlhelp to make HTML files and a HTML help project" |
|
29 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" |
|
30 @echo " changes to make an overview over all changed/added/deprecated items" |
|
31 @echo " linkcheck to check all external links for integrity" |
|
32 |
|
33 clean: |
|
34 rm -rf apidoc/ |
|
35 rm -f *.html |
|
36 cd devmanual_fr && make clean |
|
37 -rm -rf build/* |
|
38 |
|
39 all: ${TARGET} devmanual apidoc html |
16 |
40 |
17 %.html: %.txt |
41 %.html: %.txt |
18 mkdoc ${MKHTMLOPTS} $< |
42 ${MKHTML} ${MKHTMLOPTS} $< |
19 |
43 |
20 clean: |
44 devmanual: |
21 rm -f *.html |
45 cd devmanual_fr && make |
|
46 #apydoc: |
|
47 # epydoc --html -o epydoc/ -n ../server/*.py ../core/*.py ../common/*.py ../server/*/*.py ../modpython/*/*.py ../common/*/*.py |
|
48 apidoc: |
|
49 epydoc --html -o apidoc -n "cubicweb" --exclude=setup --exclude=__pkginfo__ ../ |
|
50 |
|
51 # run sphinx ### |
|
52 html: |
|
53 mkdir -p build/html build/doctrees |
|
54 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html |
|
55 @echo |
|
56 @echo "Build finished. The HTML pages are in build/html." |
|
57 |
|
58 pickle: |
|
59 mkdir -p build/pickle build/doctrees |
|
60 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle |
|
61 @echo |
|
62 @echo "Build finished; now you can process the pickle files or run" |
|
63 @echo " sphinx-web build/pickle" |
|
64 @echo "to start the sphinx-web server." |
|
65 |
|
66 web: pickle |
|
67 |
|
68 htmlhelp: |
|
69 mkdir -p build/htmlhelp build/doctrees |
|
70 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp |
|
71 @echo |
|
72 @echo "Build finished; now you can run HTML Help Workshop with the" \ |
|
73 ".hhp project file in build/htmlhelp." |
|
74 |
|
75 latex: |
|
76 mkdir -p build/latex build/doctrees |
|
77 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex |
|
78 @echo |
|
79 @echo "Build finished; the LaTeX files are in build/latex." |
|
80 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ |
|
81 "run these through (pdf)latex." |
|
82 |
|
83 changes: |
|
84 mkdir -p build/changes build/doctrees |
|
85 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes |
|
86 @echo |
|
87 @echo "The overview file is in build/changes." |
|
88 |
|
89 linkcheck: |
|
90 mkdir -p build/linkcheck build/doctrees |
|
91 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck |
|
92 @echo |
|
93 @echo "Link check complete; look for any errors in the above output " \ |
|
94 "or in build/linkcheck/output.txt." |