summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-05-07 00:18:21 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-05-07 00:18:21 -0700
commitbfe128deb88ae00efa37d4ebffc70b4bf8bf8a33 (patch)
treed139951e361559a442e63c2d10118d3c4b6f8834 /Makefile
parent9ea045d96e53c916948d61eac48dcfb61c8c7964 (diff)
parent561d0c76183d8de7e4a335b6eb8eb635c0942923 (diff)
downloadluaotfload-bfe128deb88ae00efa37d4ebffc70b4bf8bf8a33.tar.gz
Merge pull request #49 from phi-gamma/master
man page
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 22 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 467891d..ded3418 100644
--- a/Makefile
+++ b/Makefile
@@ -4,22 +4,27 @@ NAME = luaotfload
DOC = $(NAME).pdf
DTX = $(NAME).dtx
OTFL = $(wildcard luaotfload-*.lua) luaotfload-blacklist.cnf $(GLYPHS)
-SCRIPT = luaotfload-tool.lua
GLYPHSCRIPT = mkglyphlist
GLYPHSOURCE = glyphlist.txt
-GRAPH = filegraph
-DOTPDF = $(GRAPH).pdf
-DOT = $(GRAPH).dot
+SCRIPTNAME = luaotfload-tool
+SCRIPT = $(SCRIPTNAME).lua
+MANSOURCE = $(SCRIPTNAME).rst
+MANPAGE = $(SCRIPTNAME).1
+
+GRAPH = filegraph
+DOTPDF = $(GRAPH).pdf
+DOT = $(GRAPH).dot
# Files grouped by generation mode
GLYPHS = font-age.lua
GRAPHED = $(DOTPDF)
+MAN = $(MANPAGE)
COMPILED = $(DOC)
UNPACKED = luaotfload.sty luaotfload.lua
-GENERATED = $(GRAPHED) $(UNPACKED) $(COMPILED) $(GLYPHS)
-SOURCE = $(DTX) $(OTFL) README Makefile NEWS $(SCRIPT) $(GLYPHSCRIPT)
+GENERATED = $(GRAPHED) $(UNPACKED) $(COMPILED) $(GLYPHS) $(MAN)
+SOURCE = $(DTX) $(MANSOURCE) $(OTFL) README Makefile NEWS $(SCRIPT) $(GLYPHSCRIPT)
# test files
TESTDIR = tests
@@ -30,7 +35,8 @@ TESTFILES_TL = $(filter-out $(TESTFILES_SYS), $(TESTFILES))
# Files grouped by installation location
SCRIPTFILES = $(SCRIPT) $(GLYPHSCRIPT)
RUNFILES = $(UNPACKED) $(OTFL)
-DOCFILES = $(DOC) README NEWS
+DOCFILES = $(DOC) $(DOTPDF) README NEWS
+MANFILES = $(MANPAGE)
SRCFILES = $(DTX) Makefile
# The following definitions should be equivalent
@@ -42,6 +48,7 @@ FORMAT = luatex
SCRIPTDIR = $(TEXMFROOT)/scripts/$(NAME)
RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
+MANDIR = $(TEXMFROOT)/doc/man/man1/
SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
TEXMFROOT = $(shell kpsewhich --var-value TEXMFHOME)
@@ -54,13 +61,15 @@ DO_TEX = tex --interaction=batchmode $< >/dev/null
DO_LATEX = latexmk -pdf -e '$$pdflatex = q(lualatex %O %S)' -silent $< >/dev/null
DO_GRAPHVIZ = dot -Tpdf -o $@ $< > /dev/null
DO_GLYPHLIST = texlua ./mkglyphlist > /dev/null
+DO_DOCUTILS = rst2man2 $< >$@ 2>/dev/null
all: $(GENERATED)
graph: $(GRAPHED)
-doc: $(GRAPHED) $(COMPILED)
+doc: $(GRAPHED) $(COMPILED) $(MAN)
+manual: $(MAN)
unpack: $(UNPACKED)
glyphs: $(GLYPHS)
-ctan: check $(CTAN_ZIP)
+ctan: $(CTAN_ZIP)
tds: $(TDS_ZIP)
world: all ctan
@@ -76,6 +85,9 @@ $(COMPILED): $(DTX)
$(UNPACKED): $(DTX)
$(DO_TEX)
+$(MAN): $(MANSOURCE)
+ $(DO_DOCUTILS)
+
$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
@@ -86,6 +98,7 @@ define run-install
@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
+@mkdir -p $(MANDIR) && cp $(MANFILES) $(MANDIR)
endef
$(TDS_ZIP): TEXMFROOT=./tmp-texmf