summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-02-10 08:02:31 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2014-02-10 08:02:31 +0100
commit446596c46f495760b8c19d51bdfc3d210cd194bc (patch)
tree97c0236b1878e8a6b40e0135fa13bad9dbefb504
parentc148347cb5c2c6cd3b58ac9daaad751500e190fd (diff)
parent06e79fac8810293b5f3e9d03a1c0f838aefb4784 (diff)
downloadluaotfload-446596c46f495760b8c19d51bdfc3d210cd194bc.tar.gz
Merge pull request #194 from phi-gamma/texlive2014
move documentation to ./doc subdir
-rw-r--r--.gitignore1
-rw-r--r--Makefile148
-rw-r--r--doc/Makefile47
-rw-r--r--doc/filegraph.dot (renamed from filegraph.dot)0
-rw-r--r--doc/luaotfload-tool.rst (renamed from luaotfload-tool.rst)0
-rw-r--r--doc/luaotfload.dtx (renamed from luaotfload.dtx)37
-rw-r--r--luaotfload-parsers.lua2
-rw-r--r--luaotfload.sty45
8 files changed, 173 insertions, 107 deletions
diff --git a/.gitignore b/.gitignore
index e010a81..0da53bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,6 @@ luaotfload/*
# Files generated by 'make world' and removed by 'make mrproper'
luaotfload.pdf
-luaotfload.sty
luaotfload.tds.zip
luaotfload.zip
diff --git a/Makefile b/Makefile
index 8405e3a..97a733a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,82 +1,71 @@
# Makefile for luaotfload
-NAME = luaotfload
-DOC = $(NAME).pdf
-DTX = $(NAME).dtx
-OTFL = $(wildcard luaotfload-*.lua) luaotfload-blacklist.cnf
+NAME = luaotfload
+LUAOTFLOAD = $(wildcard luaotfload-*.lua) luaotfload-blacklist.cnf
-GLYPHSCRIPT = mkglyphlist
-GLYPHSOURCE = glyphlist.txt
-CHARSCRIPT = mkcharacters
-STATUSSCRIPT = mkstatus
+GLYPHSCRIPT = mkglyphlist
+GLYPHSOURCE = glyphlist.txt
+CHARSCRIPT = mkcharacters
+STATUSSCRIPT = mkstatus
RESOURCESCRIPTS = $(GLYPHSCRIPT) $(CHARSCRIPT) $(STATUSSCRIPT)
-SCRIPTNAME = luaotfload-tool
-SCRIPT = $(SCRIPTNAME).lua
-MANSOURCE = $(SCRIPTNAME).rst
-MANPAGE = $(SCRIPTNAME).1
-OLDSCRIPT = luaotfload-legacy-tool.lua
+SCRIPTNAME = luaotfload-tool
+SCRIPT = $(SCRIPTNAME).lua
-GRAPH = filegraph
-DOTPDF = $(GRAPH).pdf
-DOT = $(GRAPH).dot
+DOCSRCDIR = ./doc
+GRAPH = filegraph
+DOCSRC = $(DOCSRCDIR)/$(NAME).dtx
+GRAPHSRC = $(DOCSRCDIR)/$(GRAPH).dot
+MANSRC = $(DOCSRCDIR)/$(SCRIPTNAME).rst
+
+DOCPDF = $(DOCSRCDIR)/$(NAME).pdf
+DOTPDF = $(DOCSRCDIR)/$(GRAPH).pdf
+MANPAGE = $(DOCSRCDIR)/$(SCRIPTNAME).1
+
+DOCS = $(DOCPDF) $(DOTPDF) $(MANPAGE)
# Files grouped by generation mode
-GLYPHS = luaotfload-glyphlist.lua
-CHARS = luaotfload-characters.lua
-STATUS = luaotfload-status.lua
+GLYPHS = luaotfload-glyphlist.lua
+CHARS = luaotfload-characters.lua
+STATUS = luaotfload-status.lua
RESOURCES = $(GLYPHS) $(CHARS) $(STATUS)
-GRAPHED = $(DOTPDF)
-MAN = $(MANPAGE)
-COMPILED = $(DOC)
-UNPACKED = luaotfload.sty
-GENERATED = $(GRAPHED) $(UNPACKED) $(COMPILED) $(RESOURCES) $(MAN)
-SOURCE = $(DTX) $(MANSOURCE) $(OTFL) README Makefile NEWS $(RESOURCESCRIPTS)
+SOURCE = $(DOCSRC) $(MANSRC) $(LUAOTFLOAD) README Makefile NEWS $(RESOURCESCRIPTS)
# Files grouped by installation location
-SCRIPTSTATUS = $(SCRIPT) $(OLDSCRIPT) $(RESOURCESCRIPTS)
-RUNSTATUS = $(UNPACKED) $(filter-out $(SCRIPTSTATUS),$(OTFL))
-DOCSTATUS = $(DOC) $(DOTPDF) README NEWS
+SCRIPTSTATUS = $(SCRIPT) $(OLDSCRIPT) $(RESOURCESCRIPTS)
+RUNSTATUS = $(UNPACKED) $(filter-out $(SCRIPTSTATUS),$(LUAOTFLOAD))
+DOCSTATUS = $(DOCPDF) $(DOTPDF) README NEWS
MANSTATUS = $(MANPAGE)
-SRCSTATUS = $(DTX) Makefile
+SRCSTATUS = $(DOCSRC) $(MANSRC) $(GRAPHSRC) Makefile
# The following definitions should be equivalent
# ALL_STATUS = $(RUNSTATUS) $(DOCSTATUS) $(SRCSTATUS)
-ALL_STATUS = $(GENERATED) $(SOURCE)
+ALL_STATUS = $(RESOURCES) $(SOURCE)
# Installation locations
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)
+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)
# CTAN-friendly subdirectory for packaging
-DISTDIR = ./luaotfload
+DISTDIR = ./$(NAME)
-CTAN_ZIP = $(NAME).zip
-TDS_ZIP = $(NAME).tds.zip
-ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
+CTAN_ZIP = $(NAME).zip
+TDS_ZIP = $(NAME).tds.zip
+ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
-LUA = texlua
+LUA = texlua
-DO_TEX = luatex --interaction=batchmode $< >/dev/null
-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_GLYPHS = $(LUA) $(GLYPHSCRIPT) > /dev/null
-DO_CHARS = $(LUA) $(CHARSCRIPT) > /dev/null
-DO_STATUS = $(LUA) $(STATUSSCRIPT) > /dev/null
-DO_DOCUTILS = rst2man $< >$@ 2>/dev/null
+DO_GLYPHS = $(LUA) $(GLYPHSCRIPT) > /dev/null
+DO_CHARS = $(LUA) $(CHARSCRIPT) > /dev/null
+DO_STATUS = $(LUA) $(STATUSSCRIPT) > /dev/null
all: $(GENERATED)
-graph: $(GRAPHED)
-doc: $(GRAPHED) $(COMPILED) $(MAN)
-manual: $(MAN)
unpack: $(UNPACKED)
resources: $(RESOURCES)
chars: $(CHARS)
@@ -85,6 +74,20 @@ ctan: $(CTAN_ZIP)
tds: $(TDS_ZIP)
world: all ctan
+graph: $(DOTPDF)
+doc: $(DOCS)
+pdf: $(DOCPDF)
+manual: $(MANPAGE)
+
+$(DOTPDF):
+ @make -C $(DOCSRCDIR) graph
+
+$(DOCPDF):
+ @make -C $(DOCSRCDIR) doc
+
+$(MANPAGE):
+ @make -C $(DOCSRCDIR) manual
+
$(GLYPHS): /dev/null
$(DO_GLYPHS)
@@ -94,42 +97,33 @@ $(CHARS): /dev/null
$(STATUS): /dev/null
$(DO_STATUS)
-$(GRAPHED): $(DOT)
- $(DO_GRAPHVIZ)
-
-$(COMPILED): $(DTX)
- $(DO_LATEX)
- $(DO_LATEX)
-
-$(UNPACKED): $(DTX)
- $(DO_TEX)
-
-$(MAN): $(MANSOURCE)
- $(DO_DOCUTILS)
-
define make-ctandir
@$(RM) -rf $(DISTDIR)
@mkdir -p $(DISTDIR) && cp $(SOURCE) $(COMPILED) $(DISTDIR)
endef
-$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
+$(CTAN_ZIP): $(DOCS) $(SOURCE) $(COMPILED) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
$(make-ctandir)
@zip -r -9 $@ $(TDS_ZIP) $(DISTDIR) >/dev/null
+define run-install-doc
+@mkdir -p $(DOCDIR) && cp -- $(DOCSTATUS) $(DOCDIR)
+@mkdir -p $(SRCDIR) && cp -- $(SRCSTATUS) $(SRCDIR)
+@mkdir -p $(MANDIR) && cp -- $(MANSTATUS) $(MANDIR)
+endef
+
define run-install
-@mkdir -p $(SCRIPTDIR) && cp $(SCRIPTSTATUS) $(SCRIPTDIR)
-@mkdir -p $(RUNDIR) && cp $(RUNSTATUS) $(RUNDIR)
-@mkdir -p $(DOCDIR) && cp $(DOCSTATUS) $(DOCDIR)
-@mkdir -p $(SRCDIR) && cp $(SRCSTATUS) $(SRCDIR)
-@mkdir -p $(MANDIR) && cp $(MANSTATUS) $(MANDIR)
+@mkdir -p $(SCRIPTDIR) && cp -- $(SCRIPTSTATUS) $(SCRIPTDIR)
+@mkdir -p $(RUNDIR) && cp -- $(RUNSTATUS) $(RUNDIR)
endef
$(TDS_ZIP): TEXMFROOT=./tmp-texmf
-$(TDS_ZIP): $(ALL_STATUS)
+$(TDS_ZIP): $(DOCS) $(ALL_STATUS)
@echo "Making TDS-ready archive $@."
@$(RM) -- $@
+ $(run-install-doc)
$(run-install)
@cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null
@$(RM) -r -- $(TEXMFROOT)
@@ -138,19 +132,23 @@ $(TDS_ZIP): $(ALL_STATUS)
install: $(ALL_STATUS)
@echo "Installing in '$(TEXMFROOT)'."
+ $(run-install-docs)
$(run-install)
-manifest:
+manifest:
@echo "Source files:"
@for f in $(SOURCE); do echo $$f; done
@echo ""
@echo "Derived files:"
@for f in $(GENERATED); do echo $$f; done
-clean:
+clean:
+ make -C $(DOCSRCDIR) $@
@$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out
mrproper: clean
+ make -C $(DOCSRCDIR) $@
@$(RM) -- $(GENERATED) $(ZIPS) $(GLYPHSOURCE)
@$(RM) -r -- $(DISTDIR)
+# vim:set noexpandtab:tabstop=8:shiftwidth=2
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..2040f5a
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,47 @@
+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)
+
+# vim:set noexpandtab:tabstop=8:shiftwidth=2
diff --git a/filegraph.dot b/doc/filegraph.dot
index 47db9ea..47db9ea 100644
--- a/filegraph.dot
+++ b/doc/filegraph.dot
diff --git a/luaotfload-tool.rst b/doc/luaotfload-tool.rst
index 6863918..6863918 100644
--- a/luaotfload-tool.rst
+++ b/doc/luaotfload-tool.rst
diff --git a/luaotfload.dtx b/doc/luaotfload.dtx
index 8f8632c..e0311a4 100644
--- a/luaotfload.dtx
+++ b/doc/luaotfload.dtx
@@ -67,13 +67,6 @@ and the derived files
\endpreamble
-\let\MetaPrefix\DoubleperCent
-
-\generate{%
- \usedir{tex/luatex/luaotfload}%
- \file{luaotfload.sty}{\from{luaotfload.dtx}{package}}%
-}
-
\obeyspaces
\Msg{************************************************************************}
\Msg{*}
@@ -1558,30 +1551,12 @@ and the derived files
%
% \section{\fileent{luaotfload.sty}}
%
-% \iffalse
-%<*package>
-% \fi
-%
-% Classical Plain+\LATEX package initialization.
-%
-% \begin{macrocode}
-\csname ifluaotfloadloaded\endcsname
-\let\ifluaotfloadloaded\endinput
-\bgroup\expandafter\expandafter\expandafter\egroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \input luatexbase.sty
-\else
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luaotfload}%
- [2014/42/42 v2.5 OpenType layout system]
- \RequirePackage{luatexbase}
-\fi
-\RequireLuaModule{luaotfload-main}
-\endinput
-% \end{macrocode}
-% \iffalse
-%</package>
-% \fi
+% As of version 2.5, the file \fileent{luaotfload.sty} is no longer
+% generated from the \abbrev{dtx}.
+% Instead, it is maintained separately as a plain \identifier{\TEX} file
+% in the Luaotfload \identifier{git} tree.
+% The file documentation which used to be found in this section has
+% been preserved in the comments.
%
% \clearpage
% \section{The GNU GPL License v2}
diff --git a/luaotfload-parsers.lua b/luaotfload-parsers.lua
index 5145ca0..1048e1d 100644
--- a/luaotfload-parsers.lua
+++ b/luaotfload-parsers.lua
@@ -46,6 +46,8 @@ local stringsub = string.sub
local stringfind = string.find
local stringlower = string.lower
+local mathceil = math.ceil
+
local lfs = lfs
local lfsisfile = lfs.isfile
local lfsisdir = lfs.isdir
diff --git a/luaotfload.sty b/luaotfload.sty
new file mode 100644
index 0000000..a235d6b
--- /dev/null
+++ b/luaotfload.sty
@@ -0,0 +1,45 @@
+%% Copyright (C) 2009-2014
+%%
+%% by Elie Roux <elie.roux@telecom-bretagne.eu>
+%% and Khaled Hosny <khaledhosny@eglug.org>
+%% and Philipp Gesang <philipp.gesang@alumni.uni-heidelberg.de>
+%%
+%% This file is part of Luaotfload.
+%%
+%% Home: https://github.com/lualatex/luaotfload
+%% Support: <lualatex-dev@tug.org>.
+%%
+%% Luaotfload is under the GPL v2.0 (exactly) license.
+%%
+%% ----------------------------------------------------------------------------
+%%
+%% Luaotfload is free software; you can redistribute it and/or
+%% modify it under the terms of the GNU General Public License
+%% as published by the Free Software Foundation; version 2
+%% of the License.
+%%
+%% Luaotfload is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with Luaotfload; if not, see <http://www.gnu.org/licenses/>.
+%%
+%% ----------------------------------------------------------------------------
+%%
+%% Classical Plain+\LATEX package initialization.
+%%
+\csname ifluaotfloadloaded\endcsname
+\let\ifluaotfloadloaded\endinput
+\bgroup\expandafter\expandafter\expandafter\egroup
+\expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \input luatexbase.sty
+\else
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{luaotfload}%
+ [2014/42/42 v2.5 OpenType layout system]
+ \RequirePackage{luatexbase}
+\fi
+\RequireLuaModule{luaotfload-main}
+