-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
83 lines (58 loc) · 1.51 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
PAPER=paper
TALK=talk
all: latex/$(PAPER).pdf latex/$(TALK).pdf
MODULES:= \
Language \
Inverses \
Calculus \
Decidability \
Reflections \
Symbolic \
Automatic \
SizedAutomatic \
Predicate \
Existential \
Transport
LAGDAS:=$(patsubst %,%.lagda,$(MODULES))
AGDA_DEPENDENCIES:=$(patsubst %,latex/%.tex,$(MODULES))
.SECONDARY: $(AGDA_DEPENDENCIES)
LATEX_DEPENDENCIES:= \
latex/bib.bib \
latex/macros.tex \
latex/unicode.tex \
latex/commands.tex \
$(AGDA_DEPENDENCIES)
test :
echo $(LATEX_DEPENDENCIES)
AGDA=agda
# AGDA-EXTRAS=--only-scope-checking
PRECIOUS: $(LATEX_DEPENDENCIES) latex/$(PAPER).tex latex/$(TALK).tex
latex/%.tex: %.lagda
@mkdir -p $(dir $@)
${AGDA} -i . --latex --latex-dir=latex $(AGDA-EXTRAS) $<
# > $(basename $@).log
latex/%: %
@mkdir -p $(dir $@)
cp $< $@
latex/%.pdf: $(LATEX_DEPENDENCIES) latex/%.tex
cd latex && latexmk -xelatex -bibtex $*.tex
@touch $@
# The touch is in case latexmk decides not to update the pdf.
SHOWPDF=skim
see: $(PAPER).see
%.see: latex/%.pdf
${SHOWPDF} $<
SOURCES=$(shell find . -name '*.*agda' | grep -v Junk | grep -v _build)
source.zip: $(SOURCES) ld.agda-lib
zip $@ $^
clean:
rm -r latex
tags: $(SOURCES) paper.tex talk.tex
etags $^
web: .paper-token .talk-token
.paper-token: latex/$(PAPER).pdf
scp $< conal@conal.net:/home/conal/domains/conal/htdocs/papers/language-derivatives/
@touch $@
.talk-token: latex/$(TALK).pdf
scp $< conal@conal.net:/home/conal/domains/conal/htdocs/talks/language-derivatives.pdf
@touch $@