| 1 | # Minimal makefile for Sphinx documentation |
| 2 | # |
| 3 | # To generate html docs locally: |
| 4 | # Recommend doing this from a virtual environment: |
| 5 | # $ sudo apt-get install virtualenv python3-venv |
| 6 | # $ virtualenv myproject # or python3 -m venv myproject |
| 7 | # $ source myproject/bin/activate |
| 8 | # |
| 9 | # Then install sphinx packages (if running locally) |
| 10 | # $ pip install m2r2 |
| 11 | # $ pip install sphinxcontrib-apidoc |
| 12 | # $ pip install sphinx-rtd-theme |
| 13 | # |
| 14 | |
| 15 | # You can set these variables from the command line, and also |
| 16 | # from the environment for the first two. |
| 17 | SOURCEDIR = ../absl |
| 18 | RSTDIR = source |
| 19 | HTMLDIR = build |
| 20 | HTMLDIR = build |
| 21 | # If you change the conf.py apidoc_excluded_paths, you need to update |
| 22 | # the excluded paths in APIDOC_EXCLUDE too. The paths are relative |
| 23 | # to the docs/ directory (if you want to filter out absl/tests you need |
| 24 | # to use "../*/tests".) |
| 25 | APIDOC_EXCLUDE = ../*/*/tests/* ../*/tests/* |
| 26 | SPHINXBUILD ?= sphinx-build |
| 27 | SPHINXAPIDOC ?= sphinx-apidoc |
| 28 | |
| 29 | # Build .rst files for all Python sources in SOURCEDIR. |
| 30 | # This rule isn't called by readthedocs, its only used for manual testing. |
| 31 | rstfiles: |
| 32 | @$(SPHINXAPIDOC) -o $(RSTDIR) $(SOURCEDIR) $(APIDOC_EXCLUDE) |
| 33 | |
| 34 | # Run after "make rstfiles" |
| 35 | # You can review sphinx generated files in docs/build directory. |
| 36 | htmlfiles: |
| 37 | @$(SPHINXBUILD) -b html -c $(RSTDIR) $(RSTDIR) $(HTMLDIR) |