Parsing of all a make flags in loop #104541
86
make.bat
86
make.bat
@ -1,50 +1,50 @@
|
||||
@ECHO OFF
|
||||
|
||||
if "%1" == "" (
|
||||
set LIVEHTML=1
|
||||
set LIVEHTML=1
|
||||
)
|
||||
|
||||
REM Persing of all the flags
|
||||
:argv_loop
|
||||
if NOT "%1" == "" (
|
||||
if "%1" == "help" (
|
||||
if "%1" == "help" (
|
||||
goto hepl
|
||||
)
|
||||
|
||||
if "%1" == "sphinx" (
|
||||
if "%1" == "sphinx" (
|
||||
set SPHINXBUILD=%2
|
||||
shift
|
||||
shift
|
||||
) else if "%1" == "lang" (
|
||||
set BF_LANG=%2
|
||||
shift
|
||||
shift
|
||||
) else if "%1" == "port" (
|
||||
set PORT=%2
|
||||
shift
|
||||
shift
|
||||
) else if "%1" == "livehtml" (
|
||||
set LIVEHTML=1
|
||||
) else if "%1" == "-latexpdf" (
|
||||
set LATEXPDF=1
|
||||
) else if "%1" == "check_syntax" (
|
||||
set CHECK_SINTAX=1
|
||||
) else if "%1" == "checkout_locale" (
|
||||
set CHECKOUT_LOCALE=1
|
||||
) else if "%1" == "update_po" (
|
||||
set UPDATE_PO=1
|
||||
) else if "%1" == "report_po_progress" (
|
||||
set REPORT_PO_PROGRESS=1
|
||||
) else if "%1" == "check_spelling" (
|
||||
set CHECK_SPELLING=1
|
||||
) else if "%1" == "check_structure" (
|
||||
set CHECK_STRUCTURE=1
|
||||
) else if "%1" == "update" (
|
||||
set UPDATE=1
|
||||
) else (
|
||||
echo Command unknown: "%1"!
|
||||
exit /b 1
|
||||
)
|
||||
set LATEXPDF=1
|
||||
) else if "%1" == "check_syntax" (
|
||||
set CHECK_SINTAX=1
|
||||
) else if "%1" == "checkout_locale" (
|
||||
set CHECKOUT_LOCALE=1
|
||||
) else if "%1" == "update_po" (
|
||||
set UPDATE_PO=1
|
||||
) else if "%1" == "report_po_progress" (
|
||||
set REPORT_PO_PROGRESS=1
|
||||
) else if "%1" == "check_spelling" (
|
||||
set CHECK_SPELLING=1
|
||||
) else if "%1" == "check_structure" (
|
||||
set CHECK_STRUCTURE=1
|
||||
) else if "%1" == "update" (
|
||||
set UPDATE=1
|
||||
) else (
|
||||
echo Command unknown: "%1"!
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
shift
|
||||
goto argv_loop
|
||||
shift
|
||||
goto argv_loop
|
||||
)
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
@ -52,10 +52,10 @@ if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
if "%BF_LANG%" == "" (
|
||||
set BF_LANG=en
|
||||
set BF_LANG=en
|
||||
)
|
||||
if "%PORT%" == "" (
|
||||
set PORT=8000
|
||||
set PORT=8000
|
||||
)
|
||||
|
||||
set SOURCEDIR=.\manual
|
||||
@ -65,7 +65,7 @@ set SPHINXOPTS=-j auto -D language=%BF_LANG%
|
||||
REM Check if sphinx-build is available and fallback to Python version if any
|
||||
%SPHINXBUILD% 1>NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
goto sphinx_python
|
||||
goto sphinx_python
|
||||
)
|
||||
goto sphinx_ok
|
||||
|
||||
@ -97,25 +97,25 @@ if "%1" == "help" (
|
||||
echo ==============
|
||||
echo Convenience targets provided for building docs
|
||||
echo.
|
||||
echo - livehtml [default] to auto build on file changes and host on localhost
|
||||
echo - livehtml [default] to auto build on file changes and host on localhost
|
||||
echo.
|
||||
echo Translations
|
||||
echo ------------
|
||||
echo.
|
||||
echo - update_po to update PO message catalogs
|
||||
echo - report_po_progress to check the progress/fuzzy strings [optionally specify locale]
|
||||
echo - update_po to update PO message catalogs
|
||||
echo - report_po_progress to check the progress/fuzzy strings [optionally specify locale]
|
||||
echo.
|
||||
echo Checking
|
||||
echo --------
|
||||
echo.
|
||||
echo - check_structure to check the structure of all .rst files
|
||||
echo - check_syntax to check the syntax of all .rst files
|
||||
echo - check_spelling to check spelling for text in RST files
|
||||
echo - check_structure to check the structure of all .rst files
|
||||
echo - check_syntax to check the syntax of all .rst files
|
||||
echo - check_spelling to check spelling for text in RST files
|
||||
echo.
|
||||
echo Utilities
|
||||
echo ---------
|
||||
echo.
|
||||
echo - update to update the repository to the most recent version.
|
||||
echo - update to update the repository to the most recent version.
|
||||
goto EOF
|
||||
)
|
||||
|
||||
@ -124,8 +124,8 @@ if "%1" == "help" (
|
||||
if "%LIVEHTML%" == "1" (
|
||||
sphinx-autobuild --open-browser --delay 0 "%SOURCEDIR%" "%BUILDDIR%\html" %SPHINXOPTS% %O% --port %PORT%
|
||||
if errorlevel 1 (
|
||||
exit /b 1
|
||||
)
|
||||
exit /b 1
|
||||
)
|
||||
goto EOF
|
||||
)
|
||||
|
||||
@ -135,7 +135,7 @@ if "%LATEXPDF%" == "1" (
|
||||
make all-pdf
|
||||
cd %~dp0
|
||||
echo To view, run:
|
||||
echo start "%BUILDDIR%\html\blender_manual.pdf"
|
||||
echo start "%BUILDDIR%\html\blender_manual.pdf"
|
||||
goto EOF
|
||||
)
|
||||
|
||||
@ -168,7 +168,7 @@ if "%UPDATE%" == "1" (
|
||||
python tools_make\make_update.py
|
||||
) else (
|
||||
REM %SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS% %O%
|
||||
REM ???????????????????????????????????????????????????????????????
|
||||
REM ???????????????????????????????????????????????????????????????
|
||||
REM goto EOF
|
||||
)
|
||||
|
||||
@ -177,8 +177,8 @@ echo.
|
||||
echo The locale directory is missing.
|
||||
echo.
|
||||
echo To correct this, checkout one or more translation repositories.
|
||||
echo Details can be found at:
|
||||
echo https://docs.blender.org/manual/en/latest/about/contribute/translations/contribute.html
|
||||
echo Details can be found at:
|
||||
echo https://docs.blender.org/manual/en/latest/about/contribute/translations/contribute.html
|
||||
rem Exit with errorlevel 1
|
||||
exit /b 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user