Home | History | Annotate | Line # | Download | only in docs
      1  1.1  christos @ECHO OFF
      2  1.1  christos 
      3  1.1  christos REM Command file for Sphinx documentation
      4  1.1  christos 
      5  1.1  christos if "%SPHINXBUILD%" == "" (
      6  1.1  christos 	set SPHINXBUILD=sphinx-build
      7  1.1  christos )
      8  1.1  christos set BUILDDIR=build
      9  1.1  christos set SRCDIR=src
     10  1.1  christos set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %SRCDIR%
     11  1.1  christos set I18NSPHINXOPTS=%SPHINXOPTS% %SRCDIR%
     12  1.1  christos if NOT "%PAPER%" == "" (
     13  1.1  christos 	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
     14  1.1  christos 	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
     15  1.1  christos )
     16  1.1  christos 
     17  1.1  christos if "%1" == "" goto help
     18  1.1  christos 
     19  1.1  christos if "%1" == "help" (
     20  1.1  christos 	:help
     21  1.1  christos 	echo.Please use `make ^<target^>` where ^<target^> is one of
     22  1.1  christos 	echo.  html       to make standalone HTML files
     23  1.1  christos 	echo.  dirhtml    to make HTML files named index.html in directories
     24  1.1  christos 	echo.  singlehtml to make a single large HTML file
     25  1.1  christos 	echo.  pickle     to make pickle files
     26  1.1  christos 	echo.  json       to make JSON files
     27  1.1  christos 	echo.  htmlhelp   to make HTML files and a HTML help project
     28  1.1  christos 	echo.  qthelp     to make HTML files and a qthelp project
     29  1.1  christos 	echo.  devhelp    to make HTML files and a Devhelp project
     30  1.1  christos 	echo.  epub       to make an epub
     31  1.1  christos 	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
     32  1.1  christos 	echo.  text       to make text files
     33  1.1  christos 	echo.  man        to make manual pages
     34  1.1  christos 	echo.  texinfo    to make Texinfo files
     35  1.1  christos 	echo.  gettext    to make PO message catalogs
     36  1.1  christos 	echo.  changes    to make an overview over all changed/added/deprecated items
     37  1.1  christos 	echo.  xml        to make Docutils-native XML files
     38  1.1  christos 	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
     39  1.1  christos 	echo.  linkcheck  to check all external links for integrity
     40  1.1  christos 	echo.  doctest    to run all doctests embedded in the documentation if enabled
     41  1.1  christos 	goto end
     42  1.1  christos )
     43  1.1  christos 
     44  1.1  christos if "%1" == "clean" (
     45  1.1  christos 	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
     46  1.1  christos 	del /q /s %BUILDDIR%\*
     47  1.1  christos 	goto end
     48  1.1  christos )
     49  1.1  christos 
     50  1.1  christos 
     51  1.1  christos %SPHINXBUILD% 2> nul
     52  1.1  christos if errorlevel 9009 (
     53  1.1  christos 	echo.
     54  1.1  christos 	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
     55  1.1  christos 	echo.installed, then set the SPHINXBUILD environment variable to point
     56  1.1  christos 	echo.to the full path of the 'sphinx-build' executable. Alternatively you
     57  1.1  christos 	echo.may add the Sphinx directory to PATH.
     58  1.1  christos 	echo.
     59  1.1  christos 	echo.If you don't have Sphinx installed, grab it from
     60  1.1  christos 	echo.http://sphinx-doc.org/
     61  1.1  christos 	exit /b 1
     62  1.1  christos )
     63  1.1  christos 
     64  1.1  christos if "%1" == "html" (
     65  1.1  christos 	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
     66  1.1  christos 	if errorlevel 1 exit /b 1
     67  1.1  christos 	echo.
     68  1.1  christos 	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
     69  1.1  christos 	goto end
     70  1.1  christos )
     71  1.1  christos 
     72  1.1  christos if "%1" == "dirhtml" (
     73  1.1  christos 	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
     74  1.1  christos 	if errorlevel 1 exit /b 1
     75  1.1  christos 	echo.
     76  1.1  christos 	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
     77  1.1  christos 	goto end
     78  1.1  christos )
     79  1.1  christos 
     80  1.1  christos if "%1" == "singlehtml" (
     81  1.1  christos 	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
     82  1.1  christos 	if errorlevel 1 exit /b 1
     83  1.1  christos 	echo.
     84  1.1  christos 	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
     85  1.1  christos 	goto end
     86  1.1  christos )
     87  1.1  christos 
     88  1.1  christos if "%1" == "pickle" (
     89  1.1  christos 	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
     90  1.1  christos 	if errorlevel 1 exit /b 1
     91  1.1  christos 	echo.
     92  1.1  christos 	echo.Build finished; now you can process the pickle files.
     93  1.1  christos 	goto end
     94  1.1  christos )
     95  1.1  christos 
     96  1.1  christos if "%1" == "json" (
     97  1.1  christos 	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
     98  1.1  christos 	if errorlevel 1 exit /b 1
     99  1.1  christos 	echo.
    100  1.1  christos 	echo.Build finished; now you can process the JSON files.
    101  1.1  christos 	goto end
    102  1.1  christos )
    103  1.1  christos 
    104  1.1  christos if "%1" == "htmlhelp" (
    105  1.1  christos 	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
    106  1.1  christos 	if errorlevel 1 exit /b 1
    107  1.1  christos 	echo.
    108  1.1  christos 	echo.Build finished; now you can run HTML Help Workshop with the ^
    109  1.1  christos .hhp project file in %BUILDDIR%/htmlhelp.
    110  1.1  christos 	goto end
    111  1.1  christos )
    112  1.1  christos 
    113  1.1  christos if "%1" == "qthelp" (
    114  1.1  christos 	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
    115  1.1  christos 	if errorlevel 1 exit /b 1
    116  1.1  christos 	echo.
    117  1.1  christos 	echo.Build finished; now you can run "qcollectiongenerator" with the ^
    118  1.1  christos .qhcp project file in %BUILDDIR%/qthelp, like this:
    119  1.1  christos 	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\libuv.qhcp
    120  1.1  christos 	echo.To view the help file:
    121  1.1  christos 	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\libuv.ghc
    122  1.1  christos 	goto end
    123  1.1  christos )
    124  1.1  christos 
    125  1.1  christos if "%1" == "devhelp" (
    126  1.1  christos 	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
    127  1.1  christos 	if errorlevel 1 exit /b 1
    128  1.1  christos 	echo.
    129  1.1  christos 	echo.Build finished.
    130  1.1  christos 	goto end
    131  1.1  christos )
    132  1.1  christos 
    133  1.1  christos if "%1" == "epub" (
    134  1.1  christos 	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
    135  1.1  christos 	if errorlevel 1 exit /b 1
    136  1.1  christos 	echo.
    137  1.1  christos 	echo.Build finished. The epub file is in %BUILDDIR%/epub.
    138  1.1  christos 	goto end
    139  1.1  christos )
    140  1.1  christos 
    141  1.1  christos if "%1" == "latex" (
    142  1.1  christos 	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
    143  1.1  christos 	if errorlevel 1 exit /b 1
    144  1.1  christos 	echo.
    145  1.1  christos 	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
    146  1.1  christos 	goto end
    147  1.1  christos )
    148  1.1  christos 
    149  1.1  christos if "%1" == "latexpdf" (
    150  1.1  christos 	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
    151  1.1  christos 	cd %BUILDDIR%/latex
    152  1.1  christos 	make all-pdf
    153  1.1  christos 	cd %BUILDDIR%/..
    154  1.1  christos 	echo.
    155  1.1  christos 	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
    156  1.1  christos 	goto end
    157  1.1  christos )
    158  1.1  christos 
    159  1.1  christos if "%1" == "latexpdfja" (
    160  1.1  christos 	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
    161  1.1  christos 	cd %BUILDDIR%/latex
    162  1.1  christos 	make all-pdf-ja
    163  1.1  christos 	cd %BUILDDIR%/..
    164  1.1  christos 	echo.
    165  1.1  christos 	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
    166  1.1  christos 	goto end
    167  1.1  christos )
    168  1.1  christos 
    169  1.1  christos if "%1" == "text" (
    170  1.1  christos 	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
    171  1.1  christos 	if errorlevel 1 exit /b 1
    172  1.1  christos 	echo.
    173  1.1  christos 	echo.Build finished. The text files are in %BUILDDIR%/text.
    174  1.1  christos 	goto end
    175  1.1  christos )
    176  1.1  christos 
    177  1.1  christos if "%1" == "man" (
    178  1.1  christos 	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
    179  1.1  christos 	if errorlevel 1 exit /b 1
    180  1.1  christos 	echo.
    181  1.1  christos 	echo.Build finished. The manual pages are in %BUILDDIR%/man.
    182  1.1  christos 	goto end
    183  1.1  christos )
    184  1.1  christos 
    185  1.1  christos if "%1" == "texinfo" (
    186  1.1  christos 	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
    187  1.1  christos 	if errorlevel 1 exit /b 1
    188  1.1  christos 	echo.
    189  1.1  christos 	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
    190  1.1  christos 	goto end
    191  1.1  christos )
    192  1.1  christos 
    193  1.1  christos if "%1" == "gettext" (
    194  1.1  christos 	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
    195  1.1  christos 	if errorlevel 1 exit /b 1
    196  1.1  christos 	echo.
    197  1.1  christos 	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
    198  1.1  christos 	goto end
    199  1.1  christos )
    200  1.1  christos 
    201  1.1  christos if "%1" == "changes" (
    202  1.1  christos 	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
    203  1.1  christos 	if errorlevel 1 exit /b 1
    204  1.1  christos 	echo.
    205  1.1  christos 	echo.The overview file is in %BUILDDIR%/changes.
    206  1.1  christos 	goto end
    207  1.1  christos )
    208  1.1  christos 
    209  1.1  christos if "%1" == "linkcheck" (
    210  1.1  christos 	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
    211  1.1  christos 	if errorlevel 1 exit /b 1
    212  1.1  christos 	echo.
    213  1.1  christos 	echo.Link check complete; look for any errors in the above output ^
    214  1.1  christos or in %BUILDDIR%/linkcheck/output.txt.
    215  1.1  christos 	goto end
    216  1.1  christos )
    217  1.1  christos 
    218  1.1  christos if "%1" == "doctest" (
    219  1.1  christos 	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
    220  1.1  christos 	if errorlevel 1 exit /b 1
    221  1.1  christos 	echo.
    222  1.1  christos 	echo.Testing of doctests in the sources finished, look at the ^
    223  1.1  christos results in %BUILDDIR%/doctest/output.txt.
    224  1.1  christos 	goto end
    225  1.1  christos )
    226  1.1  christos 
    227  1.1  christos if "%1" == "xml" (
    228  1.1  christos 	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
    229  1.1  christos 	if errorlevel 1 exit /b 1
    230  1.1  christos 	echo.
    231  1.1  christos 	echo.Build finished. The XML files are in %BUILDDIR%/xml.
    232  1.1  christos 	goto end
    233  1.1  christos )
    234  1.1  christos 
    235  1.1  christos if "%1" == "pseudoxml" (
    236  1.1  christos 	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
    237  1.1  christos 	if errorlevel 1 exit /b 1
    238  1.1  christos 	echo.
    239  1.1  christos 	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
    240  1.1  christos 	goto end
    241  1.1  christos )
    242  1.1  christos 
    243  1.1  christos :end
    244