Skip to content

Commit d96f53e

Browse files
committed
docs: improve makefiles
1 parent c3c2ebb commit d96f53e

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

docsrc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ clean:
4747
clean-all:
4848
@make clean
4949
@rm -rf docsrc/.bf_doc_gen_venv
50+
@find source/api -type f ! -name 'bayesflow.rst' -exec rm -f {} +
5051

5152
.PHONY: help Makefile
5253

docsrc/make.bat

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,46 @@ if errorlevel 9009 (
2626
exit /b 1
2727
)
2828

29+
echo.Warning: This make.bat was not tested. If you encounter errors, please
30+
echo.refer to Makefile.
31+
2932
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3033
goto end
3134

3235
:help
3336
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3437
goto end
3538

36-
:github
37-
mkdir source\_examples
38-
@REM xcopy /y /s ..\INSTALL.rst source\installation.rst
39-
xcopy /y /s ..\CONTRIBUTING.md source\contributing.md
40-
xcopy /y /s ..\examples source\_examples
41-
rmdir /q /s source\_examples\in_progress
39+
:dev
40+
python pre-build.py source
4241
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
4342
xcopy /y /s "%BUILDDIR%\html" ..\docs
4443
xcopy /y .nojekyll ..\docs\.nojekyll
45-
rmdir /q /s source\_examples
46-
rmdir /q /s _build\html\
47-
@REM del /q /s source\installation.rst
48-
del /q /s source\contributing.md
4944
goto end
5045

46+
:github
47+
set BF_DOCS_SEQUENTIAL_BUILDS=1
48+
sphinx-polyversion poly.py
49+
xcopy /y /s _build_polyversion\ ..\docs
50+
xcopy /y .nojekyll ..\docs\.nojekyll
51+
goto end
52+
53+
:parallel
54+
set BF_DOCS_SEQUENTIAL_BUILDS=0
55+
sphinx-polyversion poly.py
56+
xcopy /y /s _build_polyversion\ ..\docs
57+
xcopy /y .nojekyll ..\docs\.nojekyll
58+
5159
:clean
5260
del /q /s ..\docs\*
61+
rmdir /q /s _build
5362
rmdir /q /s %BUILDDIR%
63+
rmdir /q /s _build_polyversion
64+
rmdir /q /s source\_examples
65+
del /q /s source\contributing.md
66+
del /q /s source\installation.rst
67+
goto end
68+
5469

5570
:end
5671
popd

0 commit comments

Comments
 (0)