Makefile 485 Bytes
Newer Older
Andreas Zwinkau's avatar
Andreas Zwinkau committed
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
NAME=betreuungsv

default: $(NAME).pdf

all: default

build/%.pdf: %.tex
	mkdir -p build
	latexmk -silent -pdf -g -f -auxdir=build -outdir=build $<

%.pdf: build/%.pdf
	mkdir -p build
	mv $< $@ # atomic!
	cp $@ $<
	cp $@ ~/Dropbox/ # store latest version in Dropbox

.PHONY: show clean distclean

show: $(NAME).pdf
	xdg-open $<

clean:
	rm -f *.tmp *.tui *.log *.tuc *.mp *.bbl *.blg *.fls *.idx *.aux *.out *.fdb_latexmk *.ilg *.ind
	rm -rf build

distclean: clean
	rm -f $(NAME).pdf