Makefile (2476B)
1 THESIS_RU = arma-thesis-ru 2 THESIS_EN = arma-thesis 3 SLIDES_RU = arma-slides-ru 4 SLIDES_EN = arma-slides 5 NOTES_RU = arma-notes-ru 6 REVIEW_RU = arma-review-ru 7 ABSTRACT_RU = arma-abstract-ru 8 HANDOUT_RU = arma-handout-ru 9 10 FLAGS = \ 11 -interaction=nonstopmode \ 12 -output-directory=build \ 13 -pdf \ 14 -xelatex \ 15 -bibtex \ 16 -shell-escape 17 18 export TEXINPUTS=$(PWD)//: 19 20 all: build build/$(THESIS_RU).pdf build/$(THESIS_EN).pdf build/$(SLIDES_RU).pdf build/$(NOTES_RU).pdf build/$(SLIDES_EN).pdf build/$(HANDOUT_RU).pdf 21 22 build/$(THESIS_RU).pdf: build/$(THESIS_RU).tex preamble.tex bib/* 23 -latexmk $(FLAGS) -f $< 24 25 build/$(THESIS_EN).pdf: build/$(THESIS_EN).tex preamble.tex bib/* 26 -latexmk $(FLAGS) -f $< 27 28 build/$(SLIDES_RU).pdf: build/$(SLIDES_RU).tex slides-preamble.tex math.tex fonts.tex org.tex slides-titlepage-ru.tex 29 -latexmk $(FLAGS) -f $< 30 31 build/$(HANDOUT_RU).pdf: build/$(HANDOUT_RU).tex slides-preamble.tex math.tex fonts.tex org.tex slides-titlepage-ru.tex 32 -latexmk $(FLAGS) -f $< 33 34 build/$(SLIDES_EN).pdf: build/$(SLIDES_EN).tex slides-preamble.tex math.tex fonts.tex org.tex slides-titlepage.tex 35 -latexmk $(FLAGS) -f $< 36 37 build/$(NOTES_RU).pdf: build/$(NOTES_RU).tex build/$(SLIDES_RU).pdf slides-preamble.tex math.tex fonts.tex 38 -latexmk $(FLAGS) -f $< 39 40 build/$(REVIEW_RU).pdf: build/$(REVIEW_RU).tex preamble.tex math.tex fonts.tex 41 -latexmk $(FLAGS) -f $< 42 43 build/$(ABSTRACT_RU).odt: $(ABSTRACT_RU).org 44 org export $< odt 45 mv -v $(ABSTRACT_RU).odt build/$(ABSTRACT_RU).odt 46 47 build/$(THESIS_EN).tex: $(THESIS_EN).org 48 org export $< latex 49 mv $(THESIS_EN).tex $@ 50 51 build/$(THESIS_RU).tex: $(THESIS_RU).org 52 org export $< latex 53 mv $(THESIS_RU).tex $@ 54 55 build/$(SLIDES_RU).tex: $(SLIDES_RU).org 56 org export $< beamer 57 mv $(SLIDES_RU).tex $@ 58 59 build/$(SLIDES_EN).tex: $(SLIDES_EN).org 60 org export $< beamer 61 mv $(SLIDES_EN).tex $@ 62 63 build/$(REVIEW_RU).tex: $(REVIEW_RU).org 64 org export $< latex 65 mv $(REVIEW_RU).tex $@ 66 67 build/$(NOTES_RU).tex: build/$(SLIDES_RU).tex 68 sed -r -e 's/\\documentclass\[(.*)\]\{(.*)\}/\\documentclass[\1]{article}\\usepackage{beamerarticle}\\include{fonts}/g' < $< > $@ 69 70 build/$(HANDOUT_RU).tex: build/$(SLIDES_RU).tex 71 sed -r -e 's/\\documentclass\[(.*)\]\{(.*)\}/\\documentclass[\1,handout]{\2}/g' < $< > $@ 72 73 74 clean: 75 rm -f build/$(THESIS_EN)* 76 rm -f build/$(THESIS_RU)* 77 rm -f build/$(SLIDES_RU)* 78 rm -f build/$(SLIDES_EN)* 79 rm -f build/$(NOTES_RU)* 80 rm -f build/$(REVIEW_RU)* 81 rm -f build/$(HANDOUT_RU)* 82 83 build: 84 @mkdir -p build 85 86 .PHONY: clean all build