xref: /aosp_15_r20/external/pytorch/docs/cpp/Makefile (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1# Minimal makefile for Sphinx documentation
2
3# You can set these variables from the command line.
4SPHINXOPTS    = -j auto
5SPHINXBUILD   = sphinx-build
6SPHINXPROJ    = PyTorch
7SOURCEDIR     = source
8BUILDDIR      = build
9PYCMD         = python
10
11# Put it first so that "make" without argument is like "make help".
12help:
13	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
15.PHONY: help Makefile clean
16
17clean:
18	@# Clean up sphinx and doxygen build artifacts.
19	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20	@# Clean up exhale generated api.
21	@echo "Removing everything under generated 'source/api'..."
22	@rm -rf $(SOURCEDIR)/api
23
24# Catch-all target: route all unknown targets to Sphinx using the new
25# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
26%: Makefile
27	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
28