46 lines
1.0 KiB
Batchfile
Executable File
46 lines
1.0 KiB
Batchfile
Executable File
@ECHO OFF
|
|
|
|
REM Command file for building gwift-book
|
|
|
|
if "%SPHINXBUILD%" == "" (
|
|
set SPHINXBUILD=sphinx-build
|
|
)
|
|
set BUILDDIR=build
|
|
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
|
|
set I18NSPHINXOPTS=%SPHINXOPTS% source
|
|
if NOT "%PAPER%" == "" (
|
|
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
|
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
|
)
|
|
|
|
if "%1" == "" goto help
|
|
|
|
if "%1" == "help" (
|
|
:help
|
|
echo.Please use `make ^<target^>` where ^<target^> is one of
|
|
echo. html to make standalone HTML files
|
|
echo. pdf to make standalone PDF files
|
|
goto end
|
|
)
|
|
|
|
if "%1" == "clean" (
|
|
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
|
del /q /s %BUILDDIR%\*
|
|
goto end
|
|
)
|
|
|
|
if "%1" == "html" (
|
|
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
|
if errorlevel 1 exit /b 1
|
|
echo.
|
|
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
|
goto end
|
|
)
|
|
|
|
if "%1" == "pdf" (
|
|
asciidoctor-pdf -a pdf-themesdir=resources/themes -a pdf-theme=basic source/main.adoc -t
|
|
goto end
|
|
)
|
|
|
|
:end
|