summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex/luatexbase/Makefile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-14 18:33:36 +0000
committerKarl Berry <karl@freefriends.org>2010-05-14 18:33:36 +0000
commit09a722e13fe00b1a17488d358d8ebf0329e53691 (patch)
tree18d3dd81a75658b26719391e0b2645c00fd69b1e /Master/texmf-dist/source/luatex/luatexbase/Makefile
parent37056aa438ffe6895f43f303d6de45bdafefdccd (diff)
new package luatexbase (13may10)
git-svn-id: svn://tug.org/texlive/trunk@18256 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex/luatexbase/Makefile')
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/Makefile172
1 files changed, 172 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/luatex/luatexbase/Makefile b/Master/texmf-dist/source/luatex/luatexbase/Makefile
new file mode 100644
index 00000000000..4f018590786
--- /dev/null
+++ b/Master/texmf-dist/source/luatex/luatexbase/Makefile
@@ -0,0 +1,172 @@
+# Makefile for luatexbase
+
+NAME = luatexbase
+DTX = $(wildcard *.dtx)
+DOC = $(patsubst %.dtx, %.pdf, $(DTX))
+DTXSTY = lltxb-dtxstyle.tex
+
+# Files grouped by generation mode
+UNPACKED_MCB = luatexbase-mcb.sty mcb.lua \
+ test-mcb-latex.tex test-mcb-plain.tex
+UNPACKED_REGS = luatexbase-regs.sty \
+ test-regs-plain.tex test-regs-latex.tex
+UNPACKED_ATTR = luatexbase-attr.sty attr.lua \
+ test-attr-plain.tex test-attr-latex.tex
+UNPACKED_CCTB = luatexbase-cctb.sty cctb.lua \
+ test-cctb-plain.tex test-cctb-latex.tex
+UNPACKED_LOADER = luatexbase-loader.sty luatexbase.loader.lua \
+ test-loader-plain.tex test-loader-latex.tex \
+ $(TEST_LOADER).lua test-loader.sub.lua
+UNPACKED_MODUTILS = luatexbase-modutils.sty modutils.lua test-modutils.lua \
+ test-modutils-plain.tex test-modutils-latex.tex
+UNPACKED_COMPAT = luatexbase-compat.sty \
+ test-compat-plain.tex test-compat-latex.tex
+UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \
+ $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT)
+COMPILED = $(DOC)
+GENERATED = $(COMPILED) $(UNPACKED)
+SOURCE = $(DTX) $(DTXSTY) README TODO Changes Makefile
+
+# used for check
+TEST_LOADER = test-loader
+TMP_LOADER = $(TEST_LOADER).tex
+
+# Files grouped by installation location
+RUNFILES = $(filter-out test-%, $(UNPACKED))
+DOCFILES = $(DOC) $(filter test-%, $(UNPACKED)) README TODO Changes
+SRCFILES = $(DTX) Makefile
+
+# The following definitions should be equivalent
+# ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES)
+ALL_FILES = $(GENERATED) $(SOURCE)
+
+# Installation locations
+FORMAT = luatex
+RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
+DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
+SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
+TEXMFROOT = ./texmf
+
+INSTALL_RUNFILES = @mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
+INSTALL_DOCFILES = @mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
+INSTALL_SRCFILES = @mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
+
+TESTENV = TEXINPUTS=.:$(TEXMFROOT)/tex//:
+
+CTAN_ZIP = $(NAME).zip
+TDS_ZIP = $(NAME).tds.zip
+ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
+
+DO_TEX = tex --interaction=batchmode $< >/dev/null
+DO_PDFLATEX = pdflatex --interaction=batchmode $< >/dev/null
+DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) >/dev/null 2>&1
+
+# Main targets definition
+all: $(GENERATED)
+check: check-regs check-attr check-cctb check-loader check-modutils check-mcb \
+ check-compat
+doc: $(COMPILED)
+unpack: $(UNPACKED)
+ctan: check $(CTAN_ZIP)
+tds: $(TDS_ZIP) Makefile
+world: all ctan
+
+%.pdf: %.dtx $(DTXSTY)
+ $(DO_PDFLATEX)
+ $(DO_MAKEINDEX) || true
+ $(DO_PDFLATEX)
+ $(DO_PDFLATEX)
+
+luatexbase.%.lua: %.lua
+ ln -sf $< $@
+
+$(UNPACKED_MCB): luatexbase-mcb.dtx
+ $(DO_TEX)
+
+$(UNPACKED_REGS): luatexbase-regs.dtx
+ $(DO_TEX)
+
+$(UNPACKED_ATTR): luatexbase-attr.dtx
+ $(DO_TEX)
+
+$(UNPACKED_CCTB): luatexbase-cctb.dtx
+ $(DO_TEX)
+
+$(UNPACKED_LOADER): luatexbase-loader.dtx
+ $(DO_TEX)
+
+$(UNPACKED_MODUTILS): luatexbase-modutils.dtx
+ $(DO_TEX)
+
+$(UNPACKED_COMPAT): luatexbase-compat.dtx
+ $(DO_TEX)
+
+check-regs: $(UNPACKED_REGS)
+ luatex --interaction=batchmode test-regs-plain.tex >/dev/null
+ lualatex --interaction=batchmode test-regs-latex.tex >/dev/null
+
+check-attr: install-runfiles
+ $(TESTENV) luatex --interaction=batchmode test-attr-plain.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-attr-latex.tex >/dev/null
+
+check-cctb: install-runfiles
+ $(TESTENV) luatex --interaction=batchmode test-cctb-plain.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-cctb-latex.tex >/dev/null
+
+check-loader: install-runfiles
+ echo "this is no lua code" > $(TMP_LOADER)
+ $(TESTENV) luatex --interaction=batchmode test-loader-plain.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-loader-latex.tex >/dev/null
+
+check-modutils: install-runfiles
+ $(TESTENV) luatex --interaction=batchmode test-modutils-plain.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-modutils-latex.tex >/dev/null
+
+check-mcb: install-runfiles
+ $(TESTENV) luatex --interaction=batchmode test-mcb-plain.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-mcb-latex.tex >/dev/null
+
+check-compat: $(UNPACKED_COMPAT)
+ luatex --interaction=batchmode test-compat-plain.tex >/dev/null
+ lualatex --interaction=batchmode test-compat-latex.tex >/dev/null
+
+$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
+ @echo "Making $@ for CTAN upload."
+ @$(RM) -- $@
+ @zip -9 $@ $^ >/dev/null
+
+$(TDS_ZIP): TEXMFROOT=./tmp-texmf
+$(TDS_ZIP): $(ALL_FILES)
+ @echo "Making TDS-ready archive $@."
+ @$(RM) -- $@
+ $(INSTALL_RUNFILES)
+ $(INSTALL_DOCFILES)
+ $(INSTALL_SRCFILES)
+ @cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null
+ @$(RM) -r -- $(TEXMFROOT)
+
+.PHONY: install manifest clean mrproper install-runfiles
+
+install: $(ALL_FILES)
+ @echo "Installing in '$(TEXMFROOT)'."
+ $(INSTALL_RUNFILES)
+ $(INSTALL_DOCFILES)
+ $(INSTALL_SRCFILES)
+
+install-runfiles: $(RUNFILES)
+ $(INSTALL_RUNFILES)
+
+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:
+ @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out test-*.pdf
+
+mrproper: clean
+ @$(RM) -- $(GENERATED) $(ZIPS) $(TMP_LOADER)
+ @$(RM) -r $(TEXMFROOT)
+