blob: 9e2d59126923cf98396889a8dd8f7fb2bcd7daf9 (
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
47
48
|
NAME = luaotfload
DOCPDF = $(NAME).pdf
DOCSRC = $(NAME)-latex.tex
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): $(DOCSRC)
@echo "creating PDF documentation ($@)"
$(DO_LATEX)
$(DO_LATEX)
mv -f -- $(<:tex=pdf) $@
$(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)
# vim:noexpandtab:tabstop=8:shiftwidth=2
|