Skip to content

Commit

Permalink
docs: improve makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
vpratz committed Dec 18, 2024
1 parent c3c2ebb commit d96f53e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions docsrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ clean:
clean-all:
@make clean
@rm -rf docsrc/.bf_doc_gen_venv
@find source/api -type f ! -name 'bayesflow.rst' -exec rm -f {} +

.PHONY: help Makefile

Expand Down
35 changes: 25 additions & 10 deletions docsrc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,46 @@ if errorlevel 9009 (
exit /b 1
)

echo.Warning: This make.bat was not tested. If you encounter errors, please
echo.refer to Makefile.

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:github
mkdir source\_examples
@REM xcopy /y /s ..\INSTALL.rst source\installation.rst
xcopy /y /s ..\CONTRIBUTING.md source\contributing.md
xcopy /y /s ..\examples source\_examples
rmdir /q /s source\_examples\in_progress
:dev
python pre-build.py source
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
xcopy /y /s "%BUILDDIR%\html" ..\docs
xcopy /y .nojekyll ..\docs\.nojekyll
rmdir /q /s source\_examples
rmdir /q /s _build\html\
@REM del /q /s source\installation.rst
del /q /s source\contributing.md
goto end

:github
set BF_DOCS_SEQUENTIAL_BUILDS=1
sphinx-polyversion poly.py
xcopy /y /s _build_polyversion\ ..\docs
xcopy /y .nojekyll ..\docs\.nojekyll
goto end

:parallel
set BF_DOCS_SEQUENTIAL_BUILDS=0
sphinx-polyversion poly.py
xcopy /y /s _build_polyversion\ ..\docs
xcopy /y .nojekyll ..\docs\.nojekyll

:clean
del /q /s ..\docs\*
rmdir /q /s _build
rmdir /q /s %BUILDDIR%
rmdir /q /s _build_polyversion
rmdir /q /s source\_examples
del /q /s source\contributing.md
del /q /s source\installation.rst
goto end


:end
popd

0 comments on commit d96f53e

Please sign in to comment.