-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (49 loc) · 1.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
jobname = cloze
texmf = $(HOME)/texmf
texmftex = $(texmf)/tex/luatex
installdir = $(texmftex)/$(jobname)
all: install doc
install:
-tlmgr remove --force cloze
rm -rf $(texmf)/tex/lualatex/$(jobname)
mkdir -p $(installdir)
cp -f $(jobname).tex $(installdir)
cp -f $(jobname).sty $(installdir)
cp -f $(jobname).lua $(installdir)
doc: doc_pdf
doc_pdf:
lualatex --shell-escape cloze-doc.tex
makeindex -s gglo.ist -o cloze-doc.gls cloze-doc.glo
makeindex -s gind.ist -o cloze-doc.ind cloze-doc.idx
lualatex --shell-escape cloze-doc.tex
mkdir -p $(texmf)/doc
cp cloze-doc.pdf $(texmf)/doc/$(jobname).pdf
test: install test_luatex_without_open test_lualatex_without_open
pdftk tests-luatex.pdf tests-lualatex.pdf cat output tests.pdf
xdg-open tests.pdf > /dev/null 2>&1 &
test_luatex_without_open:
find tests/luatex -name "*.tex" -exec latexmk -latex=luatex -cd {} \;
pdftk tests/luatex/*.pdf cat output tests-luatex.pdf
test_luatex: test_luatex_without_open
xdg-open tests-luatex.pdf > /dev/null 2>&1 &
test_lualatex_without_open:
find tests/lualatex -name "*.tex" -exec latexmk -latex=lualatex -cd {} \;
pdftk tests/lualatex/*.pdf cat output tests-lualatex.pdf
test_lualatex: test_lualatex_without_open
xdg-open tests-lualatex.pdf > /dev/null 2>&1 &
clean:
git clean -d -x --force
debug: install
lualatex -cd tests/lualatex/environment_clozebox.tex
ctan:
rm -rf $(jobname)
mkdir $(jobname)
cp -f README.md $(jobname)/
rm -f $(jobname)/README.md.bak
cp -f $(jobname).ins $(jobname)/
cp -f $(jobname).dtx $(jobname)/
cp -f $(jobname).lua $(jobname)/
cp -f $(jobname).pdf $(jobname)/
tar cvfz $(jobname).tar.gz $(jobname)
rm -rf $(jobname)
.PHONY: all install doc doc_pdf doc_lua test test_luatex test_lualatex clean ctan