Skip to content

Commit

Permalink
Modernize docs/Makefile with help from sphinx-quickstart (PlasmaP…
Browse files Browse the repository at this point in the history
…y#2463)

* Update docs/Makefile

* Update docs/Makefile

* Add back some make recipes

* Update .gitignore

* Make comment timeless

Words like "new" become obsolete over time
  • Loading branch information
namurphy authored Jan 16, 2024
1 parent 2acc50b commit fd343ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ untitled*
.mypy_cache
node_modules
package-lock.json
monkeytype.sqlite3
27 changes: 11 additions & 16 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = plasmapy
SOURCEDIR = .
BUILDDIR = _build
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

clean:
rm -rf $(BUILDDIR)/*
rm -rf api cache gen_modules __pycache

clean-api:
rm -rf api

html-nonb: Makefile
@echo $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -D nbsphinx_execute='never' $(O)
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -D nbsphinx_execute='never' $(O)
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html. Jupyter notebooks were skipped."

# Catch-all target: route all unknown targets to Sphinx using the
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 comments on commit fd343ca

Please sign in to comment.