blob: eb94566621c96445b475bb3eb5c8cc0cfc2cd5af (
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
|
LAB_PATH ?= ../lab-windows
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
DIFF_VERSION ?= v2.0
main_tex ?= ihsm_paper
brief_tex ?= ihsm_tech_report
VERSION_STRING := $(shell git describe --tags --long --dirty)
all: ${main_tex}.pdf ${brief_tex}.pdf
.PHONY: diff
diff: ihsm_paper_diff.pdf
ihsm_paper_diff.tex: ihsm_paper.tex ihsm.bib
python3 diffinator.py $^ $(DIFF_VERSION) > $@
%.pdf: %.tex ihsm.bib version.tex
pdflatex -shell-escape $<
biber $*
pdflatex -shell-escape $<
version.tex: ${main_tex}.tex ${brief_tex}.tex ihsm.bib
echo "${VERSION_STRING}" > $@
resources/%.pdf: $(LAB_PATH)/%.ipynb
jupyter-nbconvert --to=pdf --output-dir=resources --output=$* --LatexExporter.template_file=resources/nbexport.tplx $^
.PHONY: clean
clean:
rm -f ${main_tex}.aux ${main_tex}.bbl ${main_tex}.bcf ${main_tex}.log ${main_tex}.blg
rm -f ${main_tex}.out ${main_tex}.run.xml texput.log
rm -f ${brief_tex}.aux ${brief_tex}.bbl ${brief_tex}.bcf ${brief_tex}.log ${brief_tex}.blg
rm -f ${brief_tex}.out ${brief_tex}.run.xml texput.log
|