aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 3a472ce11964331247829eccbffa80a793331d7e (plain)
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
ASSETS = imgs/made graph/depth_width.png graph/nearest_neighbor.png
DIRS = imgs graph outputs

$(shell mkdir -p $(DIRS))

.PHONY: all png clean
all: outputs/poster.pdf outputs/report.pdf outputs/logbook.pdf
png: outputs/poster.png
clean:
	rm -rf $(DIRS) data/tables.tex

.SECONDEXPANSION:

imgs/made: python/data.py python/img.py
	cd imgs && \
	python3 ../python/img.py
	touch imgs/made

graph/depth_width.png: python/data.py python/depwid.py
	cd graph && python3 ../python/depwid.py

graph/nearest_neighbor.png: python/data.py python/neighbor.py
	cd graph && python3 ../python/neighbor.py

outputs/poster.png: outputs/poster.pdf
	gs -sDEVICE=pngalpha -r288 -o outputs/poster.png outputs/poster.pdf

outputs/%.pdf: gen/tables.tex $$(wildcard %/*.tex) $(ASSETS)
	cd $* && pdftex document.tex >/dev/null
	rm $*/document.log
	mv $*/document.pdf $@

gen/%.tex: gen/make%.sh gen/%.orig.tex
	$<

outputs/poster.pdf: outputs/qr-source.png outputs/qr.png
outputs/logbook.pdf outputs/report.pdf: generic.tex

logbook/tables.tex poster/tables.tex: data/tables.tex

outputs/qr.png:
	qrencode https://hrhr.dev/report.pdf -o outputs/qr.png

outputs/qr-source.png:
	qrencode https://git.hrhr.dev/scifair -o outputs/qr-source.png