From 708c689312e75953db431f8838846996ff447789 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 10 Feb 2014 07:14:53 +0100 Subject: [doc] add Makefile for doc subtree --- doc/Makefile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 doc/Makefile (limited to 'doc/Makefile') diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..1ef7243 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,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) + -- cgit v1.2.3