7.7. make_docx.bat

The make_docx.bat implements a execution wrapper wrapper for the creation of the documents. Similar to make.bat. The curent final default call is:

sphinx-build

7.7.7. Source

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
REM 
REM AUTHOR = Arno-Can Uestuensoez
REM AUTHOR_EMAIL = acue_sf2@sourceforge.net
REM LICENSE = Artistic-License-2.0 + Forced-Fairplay-Constraints
REM COPYRIGHT = Copyright (C) 2019 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez
REM UUID = 1ba7bffb-c00b-4691-a3e9-e392f968e437
REM

@ECHO OFF

pushd %~dp0

if "%BUILDDOC%" == "" (
	set BUILDDOC=sphinx-build
)
if "%DOCTYPE%" == "" (
	set DOCTYPE=html
)

REM emulate "make help"
if "%1" == "help" goto help

REM emulate "make help-sphinx"
if "%1" == "help-sphinx" goto help-sphinx

REM emulate "make clean"
if "%1" == "clean" (
	rmdir /Q /S _build\%DOCTYPE%
	exit /b 0
)

REM emulate "make <doctype>"
if "%1" != "" (
	set DOCTYPE=%1
)

%BUILDDOC% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.Missing 'BUILDDOC=%BUILDDOC%' - 'sphinx-build':
	echo.- set BUILDDOC to the full path name of 'sphinx-build'
	echo.- add the directory to PATH
	echo.
	exit /b 1
)

%BUILDDOC% -M %DOCTYPE% . _build %BUILDDOCOPTS%
goto end

:help
	echo.
	echo.Makefile for the call of %BUILDDOC%.
	echo.Provides the interface by environment variables:
	echo.- BUILDDOC:     name of build tool, default 'sphinx-build'
	echo.- DOCTYPE:      type of created document, default 'html'
	echo.
	echo.The call additionally supports the pass-through of additional options 
	echo.to the build tool. 
	echo.- BUILDDOCOPTS: options to be appended to the call of name 'BUILDDOC'.
	echo.
	echo.for help on build tool call 'make help-sphinx'
	echo.
	exit /b 0

:help-sphinx
	%BUILDDOC% -M help . _build %BUILDDOCOPTS%
	exit /b 0

:end
popd

7.7.8. Download

make_docx.bat