Makefile 2.06 KB
Newer Older
1
TEX := $(filter-out tweetverif.tex,$(wildcard *.tex))
Benoit Viguier's avatar
aspell    
Benoit Viguier committed
2
3
FILES := $(TEX) $(wildcard tikz/*.tex) $(wildcard *.sty)

Benoit Viguier's avatar
Benoit Viguier committed
4
NO_COLOR="\033[0m"
Benoit Viguier's avatar
Benoit Viguier committed
5
6
7
8
9
10
11
12
13
RED = "\033[38;5;009m"
GREEN = "\033[38;5;010m"
YELLOW = "\033[38;5;011m"
ORANGE = "\033[38;5;214m"
LIGHTPURPLE = "\033[38;5;177m"
PURPLE = "\033[38;5;135m"
CYAN = "\033[38;5;014m"
LIGHTGRAY = "\033[38;5;252m"
DARKGRAY = "\033[38;5;242m"
Benoit Viguier's avatar
Benoit Viguier committed
14
15
16
17
BRIGHTRED = "\033[91m"
BOLD = "\033[1m"


18
tweetverif.pdf: FORCE tweetverif.tex tweetnacl.diff
19
	@echo $(BOLD)$(LIGHTPURPLE)"Building tweetverif.pdf"$(NO_COLOR)$(DARKGRAY)
20
21
22
	python3 latexrun.py tweetverif.tex

tweetverif.tex: FORCE $(FILES) collection.bib
Benoit Viguier's avatar
Benoit Viguier committed
23
	@echo $(BOLD)$(YELLOW)"Generating tweetverif.tex"$(NO_COLOR)$(DARKGRAY)
24
	python3 gen.py tweetverif.tex
Benoit Viguier's avatar
Benoit Viguier committed
25
26

specs_map.pdf: FORCE _files.tex
27
	@echo $(BOLD)$(LIGHTPURPLE)"Building specs_map.pdf"$(NO_COLOR)$(DARKGRAY)
Benoit Viguier's avatar
Benoit Viguier committed
28
29
30
	python3 latexrun.py _files.tex
	@echo $(BOLD)$(ORANGE)"Moving specs_map.pdf to ../"$(NO_COLOR)$(DARKGRAY)
	@mv _files.pdf ../specs_map.pdf
Benoit Viguier's avatar
Benoit Viguier committed
31

Benoit Viguier's avatar
Benoit Viguier committed
32

Benoit Viguier's avatar
Benoit Viguier committed
33
depend:
Benoit Viguier's avatar
Benoit Viguier committed
34
35
36
	@for f in $(FILES) ; do \
		echo $$f; \
	done
Benoit Viguier's avatar
Benoit Viguier committed
37

38
.PHONY: clean FORCE
Benoit Viguier's avatar
Benoit Viguier committed
39

40
41
42
43
44
45
46
47
48
tweetnacl.diff:
	@echo $(BOLD)$(YELLOW)"Generating tweetnacl.diff"$(NO_COLOR)$(DARKGRAY)
	diff -u ../proofs/vst/c/tweetnacl.c ../proofs/vst/c/tweetnaclVerifiableC.c > tweetnacl.diff.tmp; [ $$? -eq 1 ]
	sed -i -e 1,2d tweetnacl.diff.tmp
	echo '--- tweetnacl.c' >> tweetnacl.diff
	echo '+++ tweetnaclVerifiableC.c' >> tweetnacl.diff
	cat tweetnacl.diff.tmp >> tweetnacl.diff
	rm tweetnacl.diff.tmp

Benoit Viguier's avatar
Benoit Viguier committed
49
clean:
Benoit Viguier's avatar
Benoit Viguier committed
50
	@echo $(BOLD)$(RED)"cleaning..."$(NO_COLOR)
Benoit Viguier's avatar
done    
Benoit Viguier committed
51
	@rm -fr latex.out 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
52
53
	@rm *.pdf 2> /dev/null || true
	@rm *.aux 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
54
55
56
57
58
59
60
	@rm *.bbl 2> /dev/null || true
	@rm *.blg 2> /dev/null || true
	@rm *.brf 2> /dev/null || true
	@rm *.dvi 2> /dev/null || true
	@rm *.fdb_latexmk 2> /dev/null || true
	@rm *.fls 2> /dev/null || true
	@rm *.log 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
61
	@rm *.out 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
62
	@rm *.bck 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
63
	@rm *.bak 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
64
	@rm */*.aux 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
65
	@rm tweetverif.tex 2> /dev/null || true
66
	@rm tweetnacl.diff 2> /dev/null || true
Benoit Viguier's avatar
Benoit Viguier committed
67
68

spell:
Benoit Viguier's avatar
Benoit Viguier committed
69
	@for f in $(TEX) ; do \
Benoit Viguier's avatar
aspell    
Benoit Viguier committed
70
71
		aspell -t -c $$f; \
	done