chiark / gitweb /
wip
[talk-2019-ghm-rust.git] / Makefile
1
2 SLIDES+= intro
3 SLIDES+= mm0
4 SLIDES+= mm
5 SLIDES+= borrow-mut
6 SLIDES+= dangling
7
8 SLIDES+= bck-lifetimes
9 SLIDES+= macros
10
11 SLIDEFILES=$(addsuffix .ps, $(SLIDES))
12
13 o= >$@.new && mv -f $@.new $@
14
15 all:    slides.pdf talk.ps
16
17 %.ps:   %.fig
18         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
19         # wtf!
20         LC_CTYPE=en_GB fig2dev -L ps -l dummy -z A4  <$@.1 $o
21
22 mm0.ps: mm.fig
23         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
24         LC_CTYPE=en_GB fig2dev -L ps -l dummy -z A4 -D-60 <$@.1 $o
25
26 bck-lifetimes.ps: bck-err.txt.eps
27 macros.ps: serde-example.txt.eps macro-rules-example.txt.eps
28 borrow-mut.ps: borrow-mut-example.txt.eps
29 dangling.ps: dangling.txt.eps dangling-err.txt.eps
30
31 %.eps:   %.fig
32         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
33         # wtf!
34         LC_CTYPE=en_GB fig2dev -L eps <$@.1 $o
35
36 %.txt.eps: %.txt ./txt2ps
37         ./txt2ps <$< |ps2eps -s a3 $o
38
39 %.ps:   %.lout
40         lout $< $o
41
42 slides.ps: $(SLIDEFILES) Makefile
43         cat $(SLIDEFILES) $o
44
45 %.pdf:     %.ps Makefile
46         ps2pdf $< $@
47
48 talk.ps: %.ps: %.txt Makefile
49         a2ps -1 -o $@.1.tmp -B $<
50         pstops <$@.1.tmp >$@ '0@0.94(7mm,7.5mm)'
51
52 usb=/media/usb1
53
54 for-printing: talk.pdf
55         mount $(usb)
56         cp $^ $(usb)/.
57         umount $(usb)