docs/make.bat

Mon, 10 Mar 2014 16:57:08 +0200

author
Iannis <ioannis@inoe.ro>
date
Mon, 10 Mar 2014 16:57:08 +0200
changeset 38
a7523d43ddc0
parent 11
79fea4145278
permissions
-rw-r--r--

New version and structure for the docs.

binietoglou@0 1 @ECHO OFF
binietoglou@0 2
binietoglou@0 3 REM Command file for Sphinx documentation
binietoglou@0 4
binietoglou@0 5 if "%SPHINXBUILD%" == "" (
binietoglou@0 6 set SPHINXBUILD=sphinx-build
binietoglou@0 7 )
binietoglou@0 8 set BUILDDIR=aux_build
binietoglou@0 9 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
binietoglou@0 10 set I18NSPHINXOPTS=%SPHINXOPTS% .
binietoglou@0 11 if NOT "%PAPER%" == "" (
binietoglou@0 12 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
binietoglou@0 13 set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
binietoglou@0 14 )
binietoglou@0 15
binietoglou@0 16 if "%1" == "" goto help
binietoglou@0 17
binietoglou@0 18 if "%1" == "help" (
binietoglou@0 19 :help
binietoglou@0 20 echo.Please use `make ^<target^>` where ^<target^> is one of
binietoglou@0 21 echo. html to make standalone HTML files
binietoglou@0 22 echo. dirhtml to make HTML files named index.html in directories
binietoglou@0 23 echo. singlehtml to make a single large HTML file
binietoglou@0 24 echo. pickle to make pickle files
binietoglou@0 25 echo. json to make JSON files
binietoglou@0 26 echo. htmlhelp to make HTML files and a HTML help project
binietoglou@0 27 echo. qthelp to make HTML files and a qthelp project
binietoglou@0 28 echo. devhelp to make HTML files and a Devhelp project
binietoglou@0 29 echo. epub to make an epub
binietoglou@0 30 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
binietoglou@0 31 echo. text to make text files
binietoglou@0 32 echo. man to make manual pages
binietoglou@0 33 echo. texinfo to make Texinfo files
binietoglou@0 34 echo. gettext to make PO message catalogs
binietoglou@0 35 echo. changes to make an overview over all changed/added/deprecated items
binietoglou@0 36 echo. linkcheck to check all external links for integrity
binietoglou@0 37 echo. doctest to run all doctests embedded in the documentation if enabled
binietoglou@0 38 goto end
binietoglou@0 39 )
binietoglou@0 40
binietoglou@0 41 if "%1" == "clean" (
binietoglou@0 42 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
binietoglou@0 43 del /q /s %BUILDDIR%\*
binietoglou@0 44 goto end
binietoglou@0 45 )
binietoglou@0 46
binietoglou@0 47 if "%1" == "html" (
binietoglou@0 48 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
binietoglou@0 49 if errorlevel 1 exit /b 1
binietoglou@0 50 echo.
binietoglou@0 51 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
binietoglou@0 52 goto end
binietoglou@0 53 )
binietoglou@0 54
binietoglou@0 55 if "%1" == "dirhtml" (
binietoglou@0 56 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
binietoglou@0 57 if errorlevel 1 exit /b 1
binietoglou@0 58 echo.
binietoglou@0 59 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
binietoglou@0 60 goto end
binietoglou@0 61 )
binietoglou@0 62
binietoglou@0 63 if "%1" == "singlehtml" (
binietoglou@0 64 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
binietoglou@0 65 if errorlevel 1 exit /b 1
binietoglou@0 66 echo.
binietoglou@0 67 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
binietoglou@0 68 goto end
binietoglou@0 69 )
binietoglou@0 70
binietoglou@0 71 if "%1" == "pickle" (
binietoglou@0 72 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
binietoglou@0 73 if errorlevel 1 exit /b 1
binietoglou@0 74 echo.
binietoglou@0 75 echo.Build finished; now you can process the pickle files.
binietoglou@0 76 goto end
binietoglou@0 77 )
binietoglou@0 78
binietoglou@0 79 if "%1" == "json" (
binietoglou@0 80 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
binietoglou@0 81 if errorlevel 1 exit /b 1
binietoglou@0 82 echo.
binietoglou@0 83 echo.Build finished; now you can process the JSON files.
binietoglou@0 84 goto end
binietoglou@0 85 )
binietoglou@0 86
binietoglou@0 87 if "%1" == "htmlhelp" (
binietoglou@0 88 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
binietoglou@0 89 if errorlevel 1 exit /b 1
binietoglou@0 90 echo.
binietoglou@0 91 echo.Build finished; now you can run HTML Help Workshop with the ^
binietoglou@0 92 .hhp project file in %BUILDDIR%/htmlhelp.
binietoglou@0 93 goto end
binietoglou@0 94 )
binietoglou@0 95
binietoglou@0 96 if "%1" == "qthelp" (
binietoglou@0 97 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
binietoglou@0 98 if errorlevel 1 exit /b 1
binietoglou@0 99 echo.
binietoglou@0 100 echo.Build finished; now you can run "qcollectiongenerator" with the ^
binietoglou@0 101 .qhcp project file in %BUILDDIR%/qthelp, like this:
binietoglou@0 102 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\SingleCalculusChain.qhcp
binietoglou@0 103 echo.To view the help file:
binietoglou@0 104 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\SingleCalculusChain.ghc
binietoglou@0 105 goto end
binietoglou@0 106 )
binietoglou@0 107
binietoglou@0 108 if "%1" == "devhelp" (
binietoglou@0 109 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
binietoglou@0 110 if errorlevel 1 exit /b 1
binietoglou@0 111 echo.
binietoglou@0 112 echo.Build finished.
binietoglou@0 113 goto end
binietoglou@0 114 )
binietoglou@0 115
binietoglou@0 116 if "%1" == "epub" (
binietoglou@0 117 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
binietoglou@0 118 if errorlevel 1 exit /b 1
binietoglou@0 119 echo.
binietoglou@0 120 echo.Build finished. The epub file is in %BUILDDIR%/epub.
binietoglou@0 121 goto end
binietoglou@0 122 )
binietoglou@0 123
binietoglou@0 124 if "%1" == "latex" (
binietoglou@0 125 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
binietoglou@0 126 if errorlevel 1 exit /b 1
binietoglou@0 127 echo.
binietoglou@0 128 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
binietoglou@0 129 goto end
binietoglou@0 130 )
binietoglou@0 131
binietoglou@0 132 if "%1" == "text" (
binietoglou@0 133 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
binietoglou@0 134 if errorlevel 1 exit /b 1
binietoglou@0 135 echo.
binietoglou@0 136 echo.Build finished. The text files are in %BUILDDIR%/text.
binietoglou@0 137 goto end
binietoglou@0 138 )
binietoglou@0 139
binietoglou@0 140 if "%1" == "man" (
binietoglou@0 141 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
binietoglou@0 142 if errorlevel 1 exit /b 1
binietoglou@0 143 echo.
binietoglou@0 144 echo.Build finished. The manual pages are in %BUILDDIR%/man.
binietoglou@0 145 goto end
binietoglou@0 146 )
binietoglou@0 147
binietoglou@0 148 if "%1" == "texinfo" (
binietoglou@0 149 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
binietoglou@0 150 if errorlevel 1 exit /b 1
binietoglou@0 151 echo.
binietoglou@0 152 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
binietoglou@0 153 goto end
binietoglou@0 154 )
binietoglou@0 155
binietoglou@0 156 if "%1" == "gettext" (
binietoglou@0 157 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
binietoglou@0 158 if errorlevel 1 exit /b 1
binietoglou@0 159 echo.
binietoglou@0 160 echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
binietoglou@0 161 goto end
binietoglou@0 162 )
binietoglou@0 163
binietoglou@0 164 if "%1" == "changes" (
binietoglou@0 165 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
binietoglou@0 166 if errorlevel 1 exit /b 1
binietoglou@0 167 echo.
binietoglou@0 168 echo.The overview file is in %BUILDDIR%/changes.
binietoglou@0 169 goto end
binietoglou@0 170 )
binietoglou@0 171
binietoglou@0 172 if "%1" == "linkcheck" (
binietoglou@0 173 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
binietoglou@0 174 if errorlevel 1 exit /b 1
binietoglou@0 175 echo.
binietoglou@0 176 echo.Link check complete; look for any errors in the above output ^
binietoglou@0 177 or in %BUILDDIR%/linkcheck/output.txt.
binietoglou@0 178 goto end
binietoglou@0 179 )
binietoglou@0 180
binietoglou@0 181 if "%1" == "doctest" (
binietoglou@0 182 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
binietoglou@0 183 if errorlevel 1 exit /b 1
binietoglou@0 184 echo.
binietoglou@0 185 echo.Testing of doctests in the sources finished, look at the ^
binietoglou@0 186 results in %BUILDDIR%/doctest/output.txt.
binietoglou@0 187 goto end
binietoglou@0 188 )
binietoglou@0 189
binietoglou@0 190 :end

mercurial