-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
56 lines (38 loc) · 1.27 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = src
BUILDDIR = build
DISTDIR = dist
DOCKER ?= docker-compose run latex
all: $(DISTDIR)/html.tar.gz $(DISTDIR)/handout.pdf $(DISTDIR)/info.1
$(BUILDDIR)/latex/handout.pdf: pdf
$(BUILDDIR)/man/info.1: man
$(DISTDIR)/%: $(BUILDDIR)/latex/% | $(DISTDIR)
cp $< $@
$(DISTDIR)/%: $(BUILDDIR)/man/% | $(DISTDIR)
cp $< $@
$(DISTDIR)/%: html | $(DISTDIR)
tar cvzf $(DISTDIR)/html.tar.gz $(BUILDDIR)/html
html: Makefile
$(DOCKER) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
man: Makefile
$(DOCKER) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
pdf latexpdf: Makefile
@$(DOCKER) $(SPHINXBUILD) -M latexpdf "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
latex: Makefile
@$(DOCKER) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
$(ARTIFACTS_DIR):
mkdir $@
$(ARTIFACTS_DIR)/heig-vd.pdf:
@$(DOCKER) wget -P$(ARTIFACTS_DIR) $(ARTIFACTS_URL)/heig-vd.pdf
pull:
docker-compose build
clean:
$(DOCKER) $(RM) -rf $(BUILDDIR) _static
spellcheck:
@$(DOCKER) $(SPHINXBUILD) -b spelling "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
$(DISTDIR):
mkdir -p $@
# Because sphinx calls it...
all-pdf:
.PHONY: all pdf html latexpdf clean artifacts dist pull all-pdf spellcheck