1# Makefile for Sphinx documentation 2# 3 4# You can set these variables from the command line. 5SPHINXOPTS = 6SPHINXBUILD = sphinx-build 7PAPER = 8BUILDDIR = build 9 10# Internal variables. 11PAPEROPT_a4 = -D latex_paper_size=a4 12PAPEROPT_letter = -D latex_paper_size=letter 13ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 14 15.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 17help: 18 @echo "Please use \`make <target>' where <target> is one of" 19 @echo " html to make standalone HTML files" 20 @echo " dirhtml to make HTML files named index.html in directories" 21 @echo " offhtml to make standalone HTML files without fetching the new theme files" 22 @echo " singlehtml to make a single large HTML file" 23 @echo " pickle to make pickle files" 24 @echo " json to make JSON files" 25 @echo " htmlhelp to make HTML files and a HTML help project" 26 @echo " qthelp to make HTML files and a qthelp project" 27 @echo " devhelp to make HTML files and a Devhelp project" 28 @echo " epub to make an epub" 29 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 30 @echo " latexpdf to make LaTeX files and run them through pdflatex" 31 @echo " text to make text files" 32 @echo " man to make manual pages" 33 @echo " changes to make an overview of all changed/added/deprecated items" 34 @echo " linkcheck to check all external links for integrity" 35 @echo " doctest to run all doctests embedded in the documentation (if enabled)" 36 37clean: 38 -rm -rf $(BUILDDIR)/* 39 40html: 41 @echo "Downloading percona-theme ..." 42 @wget -O percona-theme.tar.gz https://www.percona.com/docs/theme-1-4/percona-server/5.6 43 @echo "Extracting theme." 44 @tar -mzxf percona-theme.tar.gz 45 @rm -rf source/percona-theme 46 @mv percona-theme-1-4 source/percona-theme 47 @rm percona-theme.tar.gz 48 @echo "Building html doc" 49 50 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 51 @echo 52 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 53 54dirhtml: 55 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 56 @echo 57 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 58 59offhtml: 60 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 61 @echo 62 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 63 64singlehtml: 65 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 66 @echo 67 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 68 69pickle: 70 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 71 @echo 72 @echo "Build finished; now you can process the pickle files." 73 74json: 75 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 76 @echo 77 @echo "Build finished; now you can process the JSON files." 78 79htmlhelp: 80 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 81 @echo 82 @echo "Build finished; now you can run HTML Help Workshop with the" \ 83 ".hhp project file in $(BUILDDIR)/htmlhelp." 84 85qthelp: 86 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 87 @echo 88 @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 89 ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 90 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PerconaServer.qhcp" 91 @echo "To view the help file:" 92 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PerconaServer.qhc" 93 94devhelp: 95 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 96 @echo 97 @echo "Build finished." 98 @echo "To view the help file:" 99 @echo "# mkdir -p $$HOME/.local/share/devhelp/PerconaServer" 100 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PerconaServer" 101 @echo "# devhelp" 102 103epub: 104 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 105 @echo 106 @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 107 108latex: 109 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 110 @echo 111 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 112 @echo "Run \`make' in that directory to run these through (pdf)latex" \ 113 "(use \`make latexpdf' here to do that automatically)." 114 115latexpdf: 116 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 117 @echo "Running LaTeX files through pdflatex..." 118 make -C $(BUILDDIR)/latex all-pdf 119 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 120 121text: 122 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 123 @echo 124 @echo "Build finished. The text files are in $(BUILDDIR)/text." 125 126man: 127 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 128 @echo 129 @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 130 131changes: 132 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 133 @echo 134 @echo "The overview file is in $(BUILDDIR)/changes." 135 136linkcheck: 137 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 138 @echo 139 @echo "Link check complete; look for any errors in the above output " \ 140 "or in $(BUILDDIR)/linkcheck/output.txt." 141 142doctest: 143 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 144 @echo "Testing of doctests in the sources finished, look at the " \ 145 "results in $(BUILDDIR)/doctest/output.txt." 146