blob: ebe0ed594872a0d96ba8d04599b776e136a9f681 (
plain)
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
|
.POSIX:
.SUFFIXES:
# commands
GIT = git
SPHINXBUILD = sphinx-build
SPHINXOPTS =
SPHINXDEFVER = -D release="$$($(GIT) describe --tags --exact-match 2>/dev/null || $(GIT) log -1 --no-decorate --oneline)"
SPHINXFULLOPTS = $(SPHINXDEFVER) $(SPHINXOPTS)
SOURCEDIR = .
BUILDDIR = _build
PDFINFO = pdfinfo
all: html pdf epub # gmi
html: Makefile
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXFULLOPTS)
gmi: Makefile
@$(SPHINXBUILD) -M gmi "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXFULLOPTS)
pdf: Makefile
@$(SPHINXBUILD) -M rinoh "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXFULLOPTS)
epub: Makefile
@$(SPHINXBUILD) -M epub "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXFULLOPTS)
clean:
rm -rf _build/*
check: pdf
test $$($(PDFINFO) _build/rinoh/crowbar-spec.pdf | grep Pages | awk '{ print $$2 }') -le 200
|