forked from odoo/odoodays-2014
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 908 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ifndef dir
$(error the 'dir' parameter must be provided e.g. make dir=project $(MAKEFILE_LIST))
endif
ifeq ($(wildcard $(dir)/index.rst),)
$(error 'dir' must be an existing directory with an index.rst)
endif
export ABSDIR = $(abspath $(dir))
SPHINXBUILD = sphinx-build
BUILDDIR = $(dir)/_build
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = \
-c master \
-q \
-d $(BUILDDIR)/doctrees \
$(PAPEROPT_$(PAPER)) \
$(SPHINXOPTS) \
$(dir)
.phony: html slides latexpdf clean
help:
@echo "Use 'make <target>' where <target> is one of html, slides or latexpdf"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
slides:
$(SPHINXBUILD) -b slides $(ALLSPHINXOPTS) $(BUILDDIR)/slides
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) -C $(BUILDDIR)/latex all-pdf