| 1 |
# You can set these variables from the command lines |
| 2 |
SPHINXOPTS ?= -j $(shell nproc) -nWT --keep-going |
| 3 |
SPHINXBUILD ?= sphinx-build |
| 4 |
|
| 5 |
.PHONY: all html clean |
| 6 |
|
| 7 |
all: html |
| 8 |
|
| 9 |
# generate html documentation with warning as errors |
| 10 |
html: |
| 11 |
$(SPHINXBUILD) $(SPHINXOPTS) -b html . ./_build/html/ |
| 12 |
|
| 13 |
# remove generated sphinx gallery examples and sphinx documentation |
| 14 |
clean: |
| 15 |
rm -rf auto_examples && rm -rf generated && rm -rf _build |
| 16 |
|
| 17 |
view: |
| 18 |
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(PWD)/_build/html/index.html')" |
| 19 |
|
| 20 |
show: view |