forked from sisl/tufte_algorithms_book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
26 lines (26 loc) · 753 Bytes
/
makefile
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
CHAPTER :=
test:
julia --color=yes pull_julia_code.jl
julia --color=yes runtests.jl
compile:
ifdef CHAPTER
cp book.tex book.tex.bak
vim \
-c ':/\\begin{document}/,/\\end{document}/s/\(^.*\\\(input\|include\).*$$\)/%\1/' \
$(foreach var,$(CHAPTER),-c ':g/\(chapter\|appendix\)\/$(var)/s/^.//' ) \
-c :wq \
book.tex
endif
-julia --color=yes pull_julia_code.jl && \
lualatex book && \
pythontex book && \
biber book && \
lualatex book
ifdef CHAPTER
mv book.tex.bak book.tex
endif
clean:
find . -type f -name "*.aux" -exec rm -f {} \;
rm -f book.bbl book.blg book.bcf book.idx book.log book.out book.pytxcode book.run.xml book.toc
rm -f all_algorithm_blocks.jl all_juliaconsole_blocks.jl all_test_blocks.jl
rm -rf pythontex-files-book