summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 909534671608ebf2cc6889cb85a91d696cfafbd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
BUILDDIR = build
DESIGN_DOCS = $(wildcard design_docs/*.rst)

.PHONY: clean html pdf all

all: html pdf

clean:
	rm -rf $(BUILDDIR)/*

html: $(DESIGN_DOCS)
	mkdir -p build/design_docs
	rst2html.py $^ $(BUILDDIR)/$(^:.rst=.html)
	sphinx-build -b html -c etc -d $(BUILDDIR)/doctrees \
	    requirements $(BUILDDIR)/requirements/html

pdf:
	sphinx-build -b latex -c etc -d $(BUILDDIR)/doctrees \
	    requirements $(BUILDDIR)/requirements/latex
	$(MAKE) -C $(BUILDDIR)/requirements/latex \
	    LATEXOPTS='--interaction=nonstopmode' all-pdf