doc/Makefile
changeset 10491 c67bcee93248
child 11057 0b59724cb3f2
equal deleted inserted replaced
10490:76ab3c71aff2 10491:c67bcee93248
       
     1 SRC=.
       
     2 
       
     3 # You can set these sphinx variables from the command line.
       
     4 SPHINXOPTS    =
       
     5 SPHINXBUILD   = sphinx-build
       
     6 PAPER         =
       
     7 #BUILDDIR      = build
       
     8 BUILDDIR      = _build
       
     9 CWDIR         = ..
       
    10 JSDIR         = ${CWDIR}/web/data
       
    11 JSTORST       = tools/pyjsrest.py
       
    12 BUILDJS       = js_api
       
    13 
       
    14 # Internal variables for sphinx
       
    15 PAPEROPT_a4     = -D latex_paper_size=a4
       
    16 PAPEROPT_letter = -D latex_paper_size=letter
       
    17 ALLSPHINXOPTS   = -d ${BUILDDIR}/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
       
    18 
       
    19 
       
    20 
       
    21 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck
       
    22 
       
    23 help:
       
    24 	@echo "Please use \`make <target>' where <target> is one of"
       
    25 	@echo "  all       to make standalone HTML files, developer manual and API doc"
       
    26 	@echo "  html      to make standalone HTML files"
       
    27 	@echo "---  "
       
    28 	@echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
       
    29 	@echo "  htmlhelp  to make HTML files and a HTML help project"
       
    30 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
       
    31 	@echo "  changes   to make an overview over all changed/added/deprecated items"
       
    32 	@echo "  linkcheck to check all external links for integrity"
       
    33 
       
    34 clean:
       
    35 	rm -f *.html
       
    36 	-rm -rf ${BUILDDIR}/html ${BUILDDIR}/doctrees
       
    37 	-rm -rf ${BUILDJS}
       
    38 
       
    39 all: html
       
    40 
       
    41 # run sphinx ###
       
    42 html: js
       
    43 	mkdir -p ${BUILDDIR}/html ${BUILDDIR}/doctrees
       
    44 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${BUILDDIR}/html
       
    45 	@echo
       
    46 	@echo "Build finished. The HTML pages are in ${BUILDDIR}/html."
       
    47 
       
    48 js:
       
    49 	mkdir -p ${BUILDJS}
       
    50 	$(JSTORST) -p ${JSDIR} -o ${BUILDJS}
       
    51 
       
    52 pickle:
       
    53 	mkdir -p ${BUILDDIR}/pickle ${BUILDDIR}/doctrees
       
    54 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) ${BUILDDIR}/pickle
       
    55 	@echo
       
    56 	@echo "Build finished; now you can process the pickle files or run"
       
    57 	@echo "  sphinx-web ${BUILDDIR}/pickle"
       
    58 	@echo "to start the sphinx-web server."
       
    59 
       
    60 web: pickle
       
    61 
       
    62 htmlhelp:
       
    63 	mkdir -p ${BUILDDIR}/htmlhelp ${BUILDDIR}/doctrees
       
    64 	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) ${BUILDDIR}/htmlhelp
       
    65 	@echo
       
    66 	@echo "Build finished; now you can run HTML Help Workshop with the" \
       
    67 	      ".hhp project file in ${BUILDDIR}/htmlhelp."
       
    68 
       
    69 latex:
       
    70 	mkdir -p ${BUILDDIR}/latex ${BUILDDIR}/doctrees
       
    71 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) ${BUILDDIR}/latex
       
    72 	@echo
       
    73 	@echo "Build finished; the LaTeX files are in ${BUILDDIR}/latex."
       
    74 	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
       
    75 	      "run these through (pdf)latex."
       
    76 
       
    77 changes:
       
    78 	mkdir -p ${BUILDDIR}/changes ${BUILDDIR}/doctrees
       
    79 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) ${BUILDDIR}/changes
       
    80 	@echo
       
    81 	@echo "The overview file is in ${BUILDDIR}/changes."
       
    82 
       
    83 linkcheck:
       
    84 	mkdir -p ${BUILDDIR}/linkcheck ${BUILDDIR}/doctrees
       
    85 	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) ${BUILDDIR}/linkcheck
       
    86 	@echo
       
    87 	@echo "Link check complete; look for any errors in the above output " \
       
    88 	      "or in ${BUILDDIR}/linkcheck/output.txt."