chiark / gitweb /
copyright
[talk-2019-ghm-rust.git] / Makefile
1
2 # A
3 SLIDES+= intro
4
5 # B
6 SLIDES+= mm0
7 SLIDES+= mm
8 SLIDES+= borrow-mut
9 SLIDES+= dangling
10 SLIDES+= borrow-nonmut
11
12 # C
13 SLIDES+= tour-61
14 SLIDES+= tour-62
15 SLIDES+= tour-63
16 SLIDES+= tourx-71
17 SLIDES+= tourx-72
18
19 # D
20 SLIDES+= c-v-rust
21 SLIDES+= stability-slide
22 SLIDES+= borrow-errormsg
23 SLIDES+= coc-slide
24
25 # E
26 SLIDES+= bck-lifetimes
27 SLIDES+= macros
28 SLIDES+= cargo
29
30 # F
31 SLIDES+= conclusion
32
33 SLIDEFILES=$(addsuffix .ps, $(SLIDES))
34
35 o= >$@.new && mv -f $@.new $@
36
37 all:    slides.pdf talk.ps
38
39 %.ps:   %.fig
40         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
41         # wtf!
42         LC_CTYPE=en_GB fig2dev -L ps -l dummy -z A4  <$@.1 $o
43
44 mm0.ps: mm.fig
45         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
46         LC_CTYPE=en_GB fig2dev -L ps -l dummy -z A4 -D-60 <$@.1 $o
47
48 bck-lifetimes.ps: bck-err.txt.eps
49 macros.ps: serde-example.txt.eps macro-rules-example.txt.eps
50 borrow-mut.ps: borrow-mut-example.txt.eps
51 dangling.ps: dangling.txt.eps dangling-err.txt.eps
52 borrow-nonmut.ps borrow-errormsg.ps: borrow-nonmut.txt.eps borrow-nonmut-error.txt.eps
53 cargo.ps: cargo-nonconfig.txt.eps
54
55 tour-main.ps: tour-example.txt.eps
56
57 tour-%.ps: tour-main.fig tour-example.txt.eps Makefile
58         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
59         LC_CTYPE=en_GB fig2dev -L ps -l dummy -z A4 -D+1:59,$*,80:99,300:999 <$@.1 $o
60
61 tourx-%.ps: tour-main.fig unsafe-example.txt.eps ffi-example.txt.eps ffi-example-cpp.txt.eps Makefile
62         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
63         LC_CTYPE=en_GB fig2dev -L ps -l dummy -z A4 -D+1:59,$*,80:89,91:99,300:999,1$*,2$* <$@.1 $o
64
65 %.eps:   %.fig
66         iconv <$< >$@.1 -f UTF-8 -t ISO-8859-1
67         # wtf!
68         LC_CTYPE=en_GB fig2dev -L eps <$@.1 $o
69
70 %.txt.eps: %.txt ./txt2ps
71         ./txt2ps <$< |ps2eps -s a3 $o
72
73 %.ps:   %.lout
74         lout $< $o
75
76 slides.ps: $(SLIDEFILES) Makefile
77         cat $(SLIDEFILES) $o
78
79 %.pdf:     %.ps Makefile
80         ps2pdf $< $@
81
82 talk.ps: %.ps: %.txt Makefile
83         a2ps -1 -o $@.1.tmp -B $<
84         pstops <$@.1.tmp >$@ '0@0.94(7mm,7.5mm)'
85
86 usb=/media/usb1
87
88 for-printing: talk.pdf
89         mount $(usb)
90         cp $^ $(usb)/.
91         umount $(usb)