From 865acc2e5dc0e0eb4d6da28c221d13cf975fdb85 Mon Sep 17 00:00:00 2001 From: Chris Bielow Date: Mon, 2 Sep 2024 15:01:33 +0200 Subject: [PATCH] add `make` capapility to Windows --- docs/README.md | 11 ++++++----- docs/make.bat | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 docs/make.bat diff --git a/docs/README.md b/docs/README.md index 5f1f4c79d..467740534 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,13 +17,14 @@ Once the environment is active, you can install all required python packages usi pip install -r /docs/requirements.txt -To build the docs run - - sphinx-build /docs/source/ build/ - -On a linux system, you can also use the provided Makefile and run +To build the docs run (works on all OS's) make html + +and check validity of links using + + make linkcheck + diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 000000000..c5e465103 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,37 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +if "%SPHINXOPTS%" == "" ( + set SPHINXOPTS=-j auto +) +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd