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