summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile56
1 files changed, 39 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 143f48a..b2972ba 100644
--- a/Makefile
+++ b/Makefile
@@ -4,24 +4,34 @@ NAME = luatexbase
DTX = $(wildcard *.dtx)
DOC = $(patsubst %.dtx, %.pdf, $(DTX))
DTXSTY = lltxb-dtxstyle.tex
+
+# used for check dependencies
+COMPAT_RUN = luatexbase-compat.sty
LOADER_RUN = luatexbase-loader.sty luatexbase.loader.lua
-MOD_RUN = luatexbase-modutils.sty luatexbase.modutils.lua
+MOD_RUN = luatexbase-modutils.sty modutils.lua
+LINKS = luatexbase.attr.lua luatexbase.cctb.lua \
+ luatexbase.mcb.lua luatexbase.modutils.lua
# Files grouped by generation mode
-UNPACKED_MCB = test-luamcallbacks.tex luamcallbacks.lua
+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 luatexbase.attr.lua \
+UNPACKED_ATTR = luatexbase-attr.sty attr.lua \
test-attr-plain.tex test-attr-latex.tex
-UNPACKED_CCTB = luatexbase-cctb.sty luatexbase.cctb.lua \
+UNPACKED_CCTB = luatexbase-cctb.sty cctb.lua \
test-cctb-plain.tex test-cctb-latex.tex
-TMP_LOADER = test-loader # temporary file for testing
+# temporary file for testing loader
+TMP_LOADER = test-loader
UNPACKED_LOADER = $(LOADER_RUN) \
+ test-loader-plain.tex test-loader-latex.tex \
$(TMP_LOADER).lua test-loader.sub.lua
-UNPACKED_MODUTILS = $(MOD_RUN) \
- test-modutils-plain.tex test-modutils-latex.tex test-modutils.lua
+UNPACKED_MODUTILS = $(MOD_RUN) test-modutils.lua \
+ test-modutils-plain.tex test-modutils-latex.tex
+UNPACKED_COMPAT = $(COMPAT_RUN) \
+ test-compat-plain.tex test-compat-latex.tex
UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \
- $(UNPACKED_LOADER) $(UNPACKED_MODUTILS)
+ $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT)
COMPILED = $(DOC)
GENERATED = $(COMPILED) $(UNPACKED)
SOURCE = $(DTX) $(DTXSTY) README TODO Changes Makefile
@@ -52,7 +62,8 @@ 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: check-regs check-attr check-cctb check-loader check-modutils check-mcb \
+ check-compat
doc: $(COMPILED)
unpack: $(UNPACKED)
ctan: check $(CTAN_ZIP)
@@ -65,7 +76,10 @@ world: all ctan
$(DO_PDFLATEX)
$(DO_PDFLATEX)
-$(UNPACKED_MCB): luamcallbacks.dtx
+luatexbase.%.lua: %.lua
+ ln -sf $< $@
+
+$(UNPACKED_MCB): luatexbase-mcb.dtx
$(DO_TEX)
$(UNPACKED_REGS): luatexbase-regs.dtx
@@ -83,29 +97,37 @@ $(UNPACKED_LOADER): luatexbase-loader.dtx
$(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: $(UNPACKED_ATTR) $(LOADER_RUN)
+check-attr: $(UNPACKED_ATTR) $(LOADER_RUN) $(LINKS) $(COMPAT_RUN)
luatex --interaction=batchmode test-attr-plain.tex >/dev/null
lualatex --interaction=batchmode test-attr-latex.tex >/dev/null
-check-cctb: $(UNPACKED_CCTB) $(LOADER_RUN)
+check-cctb: $(UNPACKED_CCTB) $(LOADER_RUN) $(LINKS) $(COMPAT_RUN)
luatex --interaction=batchmode test-cctb-plain.tex >/dev/null
lualatex --interaction=batchmode test-cctb-latex.tex >/dev/null
-check-loader: $(UNPACKED_LOADER)
+check-loader: $(UNPACKED_LOADER) $(COMPAT_RUN)
echo "this is no lua code" > $(TMP_LOADER).tex
luatex --interaction=batchmode test-loader-plain.tex >/dev/null
lualatex --interaction=batchmode test-loader-latex.tex >/dev/null
-check-modutils: $(UNPACKED_MODUTILS) $(LOADER_RUN)
+check-modutils: $(UNPACKED_MODUTILS) $(LOADER_RUN) $(LINKS) $(COMPAT_RUN)
luatex --interaction=batchmode test-modutils-plain.tex >/dev/null
lualatex --interaction=batchmode test-modutils-latex.tex >/dev/null
-check-mcb: $(UNPACKED_MCB) $(LOADER_RUN) $(MOD_RUN)
- luatex --interaction=batchmode test-luamcallbacks.tex >/dev/null
+check-mcb: $(UNPACKED_MCB) $(LOADER_RUN) $(MOD_RUN) $(LINKS) $(COMPAT_RUN)
+ luatex --interaction=batchmode test-mcb-plain.tex >/dev/null
+ 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."
@@ -143,5 +165,5 @@ clean:
@$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out test-*.pdf
mrproper: clean
- @$(RM) -- $(GENERATED) $(ZIPS) $(TMP_LOADER).tex
+ @$(RM) -- $(GENERATED) $(ZIPS) $(LINKS) $(TMP_LOADER).tex