1*58b9f456SAndroid Build Coastguard Worker# Makefile for Sphinx documentation 2*58b9f456SAndroid Build Coastguard Worker# 3*58b9f456SAndroid Build Coastguard Worker# FIXME: This hack is only in place to allow the libcxx.llvm.org/docs builder 4*58b9f456SAndroid Build Coastguard Worker# to work with libcxx. This should be removed when that builder supports 5*58b9f456SAndroid Build Coastguard Worker# out-of-tree builds. 6*58b9f456SAndroid Build Coastguard Worker 7*58b9f456SAndroid Build Coastguard Worker# You can set these variables from the command line. 8*58b9f456SAndroid Build Coastguard WorkerSPHINXOPTS = -n -W -v 9*58b9f456SAndroid Build Coastguard WorkerSPHINXBUILD = sphinx-build 10*58b9f456SAndroid Build Coastguard WorkerPAPER = 11*58b9f456SAndroid Build Coastguard WorkerBUILDDIR = _build 12*58b9f456SAndroid Build Coastguard Worker 13*58b9f456SAndroid Build Coastguard Worker# Internal variables. 14*58b9f456SAndroid Build Coastguard WorkerPAPEROPT_a4 = -D latex_paper_size=a4 15*58b9f456SAndroid Build Coastguard WorkerPAPEROPT_letter = -D latex_paper_size=letter 16*58b9f456SAndroid Build Coastguard WorkerALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 17*58b9f456SAndroid Build Coastguard Worker# the i18n builder cannot share the environment and doctrees with the others 18*58b9f456SAndroid Build Coastguard WorkerI18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19*58b9f456SAndroid Build Coastguard Worker 20*58b9f456SAndroid Build Coastguard Worker.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext default 21*58b9f456SAndroid Build Coastguard Worker 22*58b9f456SAndroid Build Coastguard Workerdefault: html 23*58b9f456SAndroid Build Coastguard Worker 24*58b9f456SAndroid Build Coastguard Workerhelp: 25*58b9f456SAndroid Build Coastguard Worker @echo "Please use \`make <target>' where <target> is one of" 26*58b9f456SAndroid Build Coastguard Worker @echo " html to make standalone HTML files" 27*58b9f456SAndroid Build Coastguard Worker 28*58b9f456SAndroid Build Coastguard Workerclean: 29*58b9f456SAndroid Build Coastguard Worker -rm -rf $(BUILDDIR)/* 30*58b9f456SAndroid Build Coastguard Worker 31*58b9f456SAndroid Build Coastguard Workerhtml: 32*58b9f456SAndroid Build Coastguard Worker $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 33*58b9f456SAndroid Build Coastguard Worker @echo 34*58b9f456SAndroid Build Coastguard Worker @# FIXME: Remove this `cp` once HTML->Sphinx transition is completed. 35*58b9f456SAndroid Build Coastguard Worker @# Kind of a hack, but HTML-formatted docs are on the way out anyway. 36*58b9f456SAndroid Build Coastguard Worker @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 37*58b9f456SAndroid Build Coastguard Worker 38