-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (40 loc) · 1.12 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
VERSION := $(file < VERSION)
SPELLBOOK_TEX := spellbook.tex
SPELLBOOK_PDF := spellbook.pdf
EXAMPLE_TEX := example.tex
EXAMPLE_PDF := example.pdf
WIZPEN_MF := texmf/fonts/source/wizpen/wizpen.mf
WIZPEN_PFB := fonts/wizpen.pfb
WIZPEN_TTF := fonts/wizpen.ttf
WIZPEN_OTF := fonts/wizpen.otf
all: $(EXAMPLE_PDF)
spellbook: $(SPELLBOOK_PDF)
clean:
rm -f $(WIZPEN_MF)
find texmf -type d -perm /1000 -exec rm -rf {} \; || true
rm -f *.aux *.log
rm -f *.pdf
redo:
$(MAKE) clean
$(MAKE) all
spellbook-redo:
$(MAKE) clean
$(MAKE) spellbook
font: $(WIZPEN_TTF) $(WIZPEN_OTF)
font-clean:
rm -f fonts/*
.PHONY: all spellbook clean redo spellbook-redo font font-clean
$(WIZPEN_MF):
mkdir -p $(dir $(WIZPEN_MF))
ruby script/wizpen.rb $(VERSION) > $(WIZPEN_MF)
$(WIZPEN_PFB): $(WIZPEN_MF)
ln -s ../$^ fonts/$(notdir $^)
cd fonts && mf2pt1 $(notdir $^)
$(WIZPEN_TTF): $(WIZPEN_PFB)
./script/tfm2ttf.pe $^
$(WIZPEN_OTF): $(WIZPEN_PFB)
./script/tfm2otf.pe $^
$(EXAMPLE_PDF): $(EXAMPLE_TEX) $(WIZPEN_MF)
TEXMFHOME=texmf lualatex $(EXAMPLE_TEX)
$(SPELLBOOK_PDF): $(SPELLBOOK_TEX) $(WIZPEN_MF)
TEXMFHOME=texmf lualatex $(SPELLBOOK_TEX)