blob: 1ef7243b0d16a0752c05df8f3468ff9139d1a57d (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
NAME = luaotfload
DOCPDF = $(NAME).pdf
DOCDTX = $(NAME).dtx
SCRIPTNAME = luaotfload-tool
MANSOURCE = $(SCRIPTNAME).rst
MANPAGE = $(SCRIPTNAME).1
GRAPH = filegraph
DOTPDF = $(GRAPH).pdf
DOT = $(GRAPH).dot
DOCS = $(DOTPDF) $(DOCPDF) $(MANPAGE)
DO_LATEXMK = @latexmk -e '$$max_repeat = 5' -pdf -lualatex -silent $< >/dev/null
# latexmk does only one run on my machine, so we’re not going to rely on it
DO_LATEX = @lualatex -interaction=batchmode $< >/dev/null
DO_GRAPHVIZ = @dot -Tpdf -o $@ $< > /dev/null
DO_DOCUTILS = @rst2man $< >$@ 2>/dev/null
doc: graph $(DOCPDF)
all: manual doc
graph: $(DOTPDF)
manual: $(MANPAGE)
$(DOCPDF): $(DOCDTX)
@echo "creating PDF documentation ($(DOCPDF))"
$(DO_LATEX)
$(DO_LATEX)
$(MANPAGE): $(MANSOURCE)
@echo "creating man page ($(MANPAGE))"
$(DO_DOCUTILS)
$(DOTPDF): $(DOT)
@echo "creating file graph ($(DOTPDF))"
$(DO_GRAPHVIZ)
.PHONY: clean mrproper
clean:
@$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out
mrproper: clean
@$(RM) -- $(DOCS)
|