aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: e3d1a82e4a69e6a5980998e633d27209d53f9e24 (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
46
47
48
49
50
51
ASSETS := imgs/made graph/depth_width.png graph/nearest_neighbor.png

$(shell mkdir -p imgs graph outputs)

.PHONY: all
all: outputs/posterboard.pdf outputs/report.pdf outputs/logbook.pdf
.PHONY: png
png: outputs/posterboard.png
.PHONY: clean
clean:
	rm -rf imgs graph outputs data/tables.tex

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/posterboard.png: outputs/posterboard.pdf 
	gs -sDEVICE=pngalpha -r288 -o outputs/posterboard.png outputs/posterboard.pdf

outputs/posterboard.pdf: $(wildcard poster/*.tex) outputs/qr-source.png outputs/qr.png $(ASSETS)
	cd poster && pdftex document.tex >/dev/null
	rm poster/document.log
	mv poster/document.pdf outputs/posterboard.pdf

outputs/logbook.pdf: $(wildcard logbook/*.tex) $(ASSETS) generic.tex
	cd logbook && pdftex document.tex >/dev/null
	rm logbook/document.log
	mv logbook/document.pdf outputs/logbook.pdf

logbook/tables.tex: data/tables.tex

outputs/report.pdf: $(wildcard report/*.tex) $(ASSETS) generic.tex
	cd report && pdftex document.tex >/dev/null
	rm report/document.log
	mv report/document.pdf outputs/report.pdf

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

data/tables.tex: data/maketables.sh data/tables.orig.tex
	data/maketables.sh