Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
138 lines (115 loc) · 6.3 KB
/
Copy pathMakefile
File metadata and controls
138 lines (115 loc) · 6.3 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
## NB: If racket complains about some modules missing, try: make prerequisites
# Default target: the latest slides
all: ltuo # slides
# Default slides: the next talk
slides: slides-2026-elte # slides-2026-els-lt slides-2026-els slides-2025-racketcon slides-2023-njpls slides-2024-lambdaconf slides-2025-shu
.DUMMY: all pdf view test repl prerequisites fare links \
preslides slides \
slides-2021-scheme-workshop slides-2023-njpls slides-2024-lambdaconf \
slides-2025-lambdaconf slides-2025-racketcon slides-2026-els slides-2026-els-lt slides-2026-elte \
ltuohtml ltuopdf ltuoview ltuosync ltuowc ltuo ltuo2 count-ltuo-citations \
check-pommette-gerbil check-pommette-racket check-pommette-chez \
%.preview %.view
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PDFVIEWER=xpdf -z width -fullscreen # foo.pdf $(P) ## at least xpdf 3.04 uses $(P) and no :$(P)
#PDFVIEWER=evince --presentation # --page-index $(P) foo.pdf
endif
ifeq ($(UNAME_S),Darwin)
PDFVIEWER=open
endif
# Installing all the prerequisite Racket modules necessary to compile the paper and slides
prerequisites:
mkdir -p build
for i in scribble-abbrevs scribble-minted scribble-math unstable-lib slideshow-text-style ; do \
raco pkg install --auto --update-deps --skip-installed $$i ; \
done
# Main dish: The Scheme Workshop 2021 paper
build/poof.pdf: poof.scrbl poof.bib header.tex util/eval-check.rkt util/examples-module.rkt util/util.rkt build/resources
#scribble --dest build --pdf --style header.tex poof.scrbl
# cd build ; scribble --pdf ../poof.scrbl
scribble --dest build --pdf poof.scrbl
view: build/poof.pdf
$(PDFVIEWER) $< $P
pdf: build/poof.pdf
# Testing the code in the paper itself
test: poof.scrbl
racket poof.scrbl
# A Racket REPL with the code in the paper
repl:
racket --lib racket/base --require main.rkt --repl
# Slides for the Scheme Workshop 2021, using Racket Slideshow
# Previewing the slides. make slides-2021-scheme-workshop.preview p=14 to start at page 14.
# NB: Alt-M for the mouse!
slides-2021-scheme-workshop: slides-2021-scheme-workshop.preview
slides-2021-scheme-workshop.preview: slides-2021-scheme-workshop.rkt
slideshow --comment-on-slide --elapsed-time --start $${p:-1} $<
slides-2021-scheme-workshop.view: slides-2021-scheme-workshop.rkt
slideshow --preview --elapsed-time $<
build/slides-2021-scheme-workshop.pdf: slides-2021-scheme-workshop.rkt
slideshow -o $@ --pdf $<
# Publishing it all on fare's server http://fare.tunes.org/files/cs/poof.pdf
fare: build/poof.pdf
cp $< ~/files/cs/
rsync -av $< bespin:files/cs/
links:
mkdir -p build ; ln -sf ../resources ../util ../poof.bib ../header.tex ../C3_linearization_example.eps build/
# Slide for njpls2023
slides-2023-njpls: build/slides-2023-njpls.html
build/slides-2023-njpls.html: slides-2023-njpls.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm build/resources
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
# Slides for LambdaConf 2024
slides-2024-lambdaconf: build/slides-2024-lambdaconf.html
build/slides-2024-lambdaconf.html: slides-2024-lambdaconf.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
# Slides for visit to SHU in 2025
slides-2025-shu: build/slides-2025-shu.html
build/slides-2025-shu.html: slides-2025-shu.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
slides-2025-racketcon: build/slides-2025-racketcon.html
build/slides-2025-racketcon.html: slides-2025-racketcon.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
slides-2026-els: build/slides-2026-els.html
build/slides-2026-els.html: slides-2026-els.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
slides-2026-els-lt: build/slides-2026-els-lt.html
build/slides-2026-els-lt.html: slides-2026-els-lt.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
slides-2026-elte: build/slides-2026-elte.html
build/slides-2026-elte.html: slides-2026-elte.rkt util/reveal.rkt util/util.rkt util/coop.rkt util/protodoc.rkt util/coop.scm
racket $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp ; exit 42;}
# Side paper became a book: LtUO
# NB: trying to use --style header.tex causes my chapters to become 0.x !!!
build/ltuo.pdf: ltuo.scrbl ltuo.bib util/util.rkt util/bibtex-unused.rkt util/ltuo_lib.rkt build/resources $(wildcard ltuo_*.scrbl) resources/pic/cube.pdf ltuo-prefix.tex
RENDER_MODE=latex scribble --dest build --lualatex --prefix ltuo-prefix.tex ltuo.scrbl
build/ltuo.html: ltuo.scrbl ltuo.bib util/util.rkt util/bibtex-unused.rkt util/ltuo_lib.rkt build/resources $(wildcard ltuo_*.scrbl)
RENDER_MODE=html scribble --dest build --html ltuo.scrbl
build/ltuo.tex: ltuo.scrbl ltuo.bib util/util.rkt util/bibtex-unused.rkt util/ltuo_lib.rkt $(wildcard ltuo_*.scrbl) ltuo-prefix.tex
RENDER_MODE=latex scribble --dest build --latex --prefix ltuo-prefix.tex ltuo.scrbl
# NB: Find errors with a grep '^!' of the output.
resources/pic/cube.pdf: resources/pic/cube.svg
inkscape resources/pic/cube.svg --export-type=pdf \
--export-width=640 --export-height=640 \
--export-background-opacity=0 \
--export-filename=resources/pic/cube.pdf
ltuohtml: build/ltuo.html
ltuopdf: build/ltuo.pdf
ltuoview: ltuopdf
$(PDFVIEWER) build/ltuo.pdf $(P)
ltuo: ltuohtml ltuopdf count-ltuo-citations ltuowc ltuoview
ltuo2: ltuohtml ltuopdf count-ltuo-citations ltuowc ltuosync ltuoview
ltuosync: build/ltuo.pdf build/ltuo.html
rsync -av $^ ~fare/files/cs/poof/
rsync -av $^ bespin:files/cs/poof/
ltuowc:
wc ltuo*.scrbl ltuo.bib
# On Ubuntu, you need: sudo apt install chezscheme scheme-chez-srfi
check-pommette-gerbil: pommette/pommette-chez.scm pommette/pommette.scm
gxi pommette/pommette.scm
check-pommette-chez: pommette/pommette-chez.scm pommette/pommette.scm
cd pommette ; chezscheme pommette-chez.scm < /dev/null
check-pommette-racket: pommette/pommette.rkt pommette/pommette.scm
racket pommette/pommette.rkt
count-ltuo-citations: # build/ltuo.tex
# grep 'Autobibtarget{' build/ltuo.tex | wc -l
grep -c '^@' ltuo.bib extra*.bib rejected.bib