1
# Minimal makefile for Sphinx documentation
4
# You can set these variables from the command line.
5
SPHINXOPTS ?= -j auto -WT --keep-going
6
SPHINXBUILD ?= sphinx-build
12
# Put it first so that "make" without argument is like "make help".
14
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
17
@$(PYCMD) source/scripts/build_activation_images.py
18
@$(PYCMD) source/scripts/build_quantization_configs.py
21
@$(PYCMD) source/scripts/onnx/build_onnx_torchscript_supported_aten_op_csv_table.py
22
@$(PYCMD) source/scripts/onnx/build_onnx_dynamo_diagnostics_rules_md.py $(SOURCEDIR)/generated/onnx_dynamo_diagnostics_rules
25
@$(PYCMD) source/scripts/build_opsets.py
28
@$(PYCMD) source/scripts/exportdb/generate_example_rst.py
31
doc2dash --name $(SPHINXPROJ) --icon $(SOURCEDIR)/_static/img/pytorch-logo-flame.png --enable-js --online-redirect-url https://pytorch.org/docs/ --force $(BUILDDIR)/html/
33
# Manually fix because Zeal doesn't deal well with `icon.png`-only at 2x resolution.
34
cp $(SPHINXPROJ).docset/icon.png $(SPHINXPROJ).docset/icon@2x.png
35
convert $(SPHINXPROJ).docset/icon@2x.png -resize 16x16 $(SPHINXPROJ).docset/icon.png
38
# stable differs from `make html` in two ways:
39
# 1) The stable logo is used instead of the unstable logo
40
# 2) There will not be a link to the stable docs.
41
# See conf.py for more details.
44
.PHONY: help Makefile docset onnx exportdb
46
# Catch-all target: route all unknown targets to Sphinx using the new
47
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
48
%: Makefile figures onnx opset exportdb
49
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
52
@echo "Removing everything under 'build' and 'source/generated'.."
53
@rm -rf $(BUILDDIR)/html/ $(BUILDDIR)/doctrees $(SOURCEDIR)/generated $(BUILDDIR)/auto_gen_aten_op_list.csv