diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 9a220f855..5622a8724 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -90,7 +90,7 @@ jobs: - name: Test docs run: | - cd ./doc/src/ + cd ./doc/ make doctest runall_persistent: diff --git a/doc/src/Makefile b/doc/Makefile similarity index 65% rename from doc/src/Makefile rename to doc/Makefile index 9a43d2644..86c5cf88b 100644 --- a/doc/src/Makefile +++ b/doc/Makefile @@ -4,18 +4,16 @@ # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build -SPHINXPROJ = mpisppy -SOURCEDIR = . -BUILDDIR = _build +SOURCEDIR = src +BUILDDIR = build + +.PHONY: help Makefile # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" # Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 000000000..12bb85973 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,28 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +if "%BUILDDIR%" == "" ( + set BUILDDIR=build +) +if "%SOURCEDIR%" == "" ( + set SOURCEDIR=src +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% + + goto end +) else ( + %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + + goto end +) + +:end