blob: 2ca1e4d3faf2bd3d78d2bdb2f9868716f7f3683c [file] [log] [blame]
Eric Fiseliere3ec6002015-09-05 05:12:04 +00001# Makefile for Sphinx documentation
2#
Eric Fiselierbf54da72015-09-05 05:29:23 +00003# FIXME: This hack is only in place to allow the libcxx.llvm.org/docs builder
4# to work with libcxx. This should be removed when that builder supports
5# out-of-tree builds.
Eric Fiseliere3ec6002015-09-05 05:12:04 +00006
7# You can set these variables from the command line.
8SPHINXOPTS =
9SPHINXBUILD = sphinx-build
10PAPER =
11BUILDDIR = _build
12
13# Internal variables.
14PAPEROPT_a4 = -D latex_paper_size=a4
15PAPEROPT_letter = -D latex_paper_size=letter
16ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
17# the i18n builder cannot share the environment and doctrees with the others
18I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19
20.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext default
21
22default: html
23
24help:
25 @echo "Please use \`make <target>' where <target> is one of"
26 @echo " html to make standalone HTML files"
27
28clean:
29 -rm -rf $(BUILDDIR)/*
30
31html:
32 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
33 @echo
34 @# FIXME: Remove this `cp` once HTML->Sphinx transition is completed.
35 @# Kind of a hack, but HTML-formatted docs are on the way out anyway.
36 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
37