aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 71152547efc031aa2377fe0cf920d186e50f33af (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
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
.POSIX:
.SUFFIXES:
.SUFFIXES: .tex .pdf

PDFTEX = pdftex
PY = python3

PDF = report.pdf poster.pdf logbook.pdf report2.pdf poster2.pdf \
logbook2.pdf
all: $(PDF)

TABLE = gen/deathtable.i gen/deathtable2.i gen/table.i gen/pvals.i

clean:
	rm -rf {report,poster,logbook}{,2}.{pdf,log} qr gen graph imgs \
	img/rot img/*.rot.jpg

.tex.pdf:
	$(PDFTEX) -jobname $* $<

qr:
	mkdir qr
	qrencode http://hrhr.dev/report.pdf        -o qr/pdf.png
	qrencode http://git.hrhr.dev/scifair/about -o qr/git.png

report.pdf: src/abstract.i src/intro.i src/methods.i src/analysis.i \
report/graphs.i report/pics.i src/biblio.i

poster.pdf: qr fmt/multicol.h src/hypo.i src/abstr.i src/methods.i \
poster/voronoi.i poster/results.i src/vars.i src/notes.i src/analysis.i\
poster/img1.i poster/img2.i poster/img3.i poster/img4.i poster/img5.i \
img/diagram.jpg img/2019-12-13-3.jpg img/c.jpg img/a.jpg img/code.png

logbook.pdf: src/biblio.i src/hypo.i src/vars.i src/methods.i \
src/bullets.i

report2.pdf: src/abstr2.i src/intro2.i src/research2.i \
src/methods2.i src/mats2.i src/analysis2.i src/conc2.i report2/graphs.i\
report2/tables.i report2/pics.i imgs graph/depth_width.png \
graph/nearest_neighbor.png

poster2.pdf: src/hypo2.i src/abstr2.i poster2/img1.i poster2/img2.i \
poster2/img3.i poster2/img4.i poster2/img5.i poster2/results.i src/research2.i \
src/mats2.i src/methods2.i src/vars2.i img/obstacle-large.jpg \
img/2019-10-18-1.jpg img/2019-12-13-2.jpg \
img/final-settlement-fake-pits.jpg img/2019-12-13-3.jpg \
img/overhead-fake-pits.jpg img/Overhead-with-obstacle.jpg \
img/corner-settle.jpg img/fake-pits.jpg img/a.jpg img/code.png

logbook2.pdf: src/research2.i src/biblio.i src/hypo2.i src/mats2.i \
src/vars2.i src/methods2.i imgs graph/depth_width.png \
graph/nearest_neighbor.png report/tables.i src/conc2.i src/bullets.i

report.pdf logbook.pdf: img/2019-10-30-1.jpg img/2019-11-21-1.jpg \
img/2019-11-21-2.jpg img/2019-11-21-3.jpg img/2019-12-02-1.jpg src/conc.i \
img/2019-12-13-1.jpg img/rot fmt/doc.h report/tables.i

poster2.pdf: imgs

report.pdf poster.pdf logbook.pdf: fmt/font.h src/mats.i \
img/2019-12-02-2.jpg img/2019-10-18-2.jpg img/2019-10-18-1.jpg \
img/2019-11-21-4.jpg img/2019-12-13-2.jpg

report2.pdf logbook2.pdf: fmt/doc.h

$(PDF): $(TABLE) fmt/com.h fmt/font.h imgs graph/made tables.i

imgs: py/data.py py/data2.py py/img.py
	mkdir -p imgs
	cd imgs && $(PY) ../py/img.py

gen/dir:
	mkdir -p gen
	touch gen/dir

gen/deathtable.i: py/data.py py/deathtable.py gen/dir
	$(PY) py/deathtable.py > gen/deathtable.i

gen/deathtable2.i: py/data2.py py/deathtable2.py gen/dir
	$(PY) py/deathtable2.py > gen/deathtable2.i

gen/table.i: py/data.py py/table.py gen/dir
	$(PY) py/table.py > gen/table.i

gen/pvals.i: py/data2.py py/pvals.py gen/dir
	$(PY) py/pvals.py > gen/pvals.i

graph/dir:
	mkdir -p graph
	touch graph/dir

graph/made: graph/depth_width.png graph/nearest_neighbor.png graph/dir \
graph/lineplot.png graph/boxplot.png
	touch graph/made

graph/depth_width.png: py/data.py py/depwid.py graph/dir
	$(PY) py/depwid.py
	mv depth_width.png graph/

graph/nearest_neighbor.png: py/data.py py/neighbor.py graph/dir
	$(PY) py/neighbor.py
	mv nearest_neighbor.png graph/

graph/boxplot.png: py/data2.py py/lineplot.py graph/dir
	$(PY) py/boxplot.py
	mv boxplot.png graph/

graph/lineplot.png: py/data2.py py/boxplot.py graph/dir
	$(PY) py/lineplot.py
	mv lineplot.png graph/

img/rot:
	for img in img/*; do \
    magick "$${img}" -rotate 90 "$$(echo "$$img" | cut -f 1 -d '.').rot.jpg"; \
	echo $${img}; done
	touch img/rot