-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (49 loc) · 2.28 KB
/
Copy pathMakefile
File metadata and controls
69 lines (49 loc) · 2.28 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
all: README.pdf mini-papers.pdf references/README.md
clean: mini-papers-clean graphs-clean
README.pdf: graphs-all
################################################################################
# Render graphs and re-create data if necessary
GRAPH_SCRIPTS = $(wildcard graphs/*.py)
.PHONY: graphs-all
graphs-all: $(GRAPH_SCRIPTS:.py=.svg)
graphs/%.png: graphs/%.py
python3 $<
graphs/%.svg: graphs/%.py
python3 $<
graphs/%.small.svg: graphs/%.svg
scour $< $@ --shorten-ids --no-line-breaks --enable-comment-stripping --remove-metadata --enable-id-stripping
graphs-clean:
rm -f graphs/*.png graphs/*.svg
################################################################################
# General typesetting & references
%.pandoc.pdf: %.md typeset/header.tex typeset/ieee.csl references/ref.bib Makefile
pandoc --bibliography=references/ref.bib --csl=typeset/ieee.csl -L typeset/columns.lua --metadata numbersections=true --metadata link-citations=true --metadata ragged-columns=true -o "$@" --include-in-header=typeset/header.tex "$<"
%.linear.pdf: %.pandoc.pdf
qpdf --linearize --remove-unreferenced-resources=yes $< $@
%.pdf: %.linear.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dSAFER -dNODOCINFO -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$@ $<
MINIPAPER_PDFS := $(wildcard mini-papers/*.md)
mini-papers-clean:
rm -f mini-papers/*.pdf
.PHONY: mini-papers-all
mini-papers.pdf: $(MINIPAPER_PDFS:.md=.pdf)
qpdf --empty --pages $^ -- $@
# Verifies all local files that are referenced exist in our references dir
check-ref-files:
cat references/ref.bib | grep file | grep -v 'url =' | cut -f 2 -d '{' | cut -f 1 -d '}' | xargs -n 1 echo | awk -e '{print "references/" $$1 }' | xargs ls -lh
references/README.md: references/ref.bib
cd references && python3 generate_readme.py
################################################################################
# Re-create the data, for given bit-sizes, also compress the dataset
data/%.sqlite3.xz:
xz -k -vvz -T 0 "data/$*.sqlite3"
.PHONY: data/%.sqlite3
data/%.sqlite3:
python3 steps/1-primes.py $*
python3 steps/2-cornacchia.py $*
python3 steps/3-trial-division.py $*
python3 steps/4-generator.py $*
python3 steps/5-curves.py $*
python3 steps/6-glv.py $*
python3 steps/7-curvefactor.py $*
python3 steps/8-embedding.py $*