Makefile 421 Bytes
Newer Older
Andreas Zwinkau's avatar
initial  
Andreas Zwinkau committed
1 2 3 4 5 6
NAME=pflichtenheft

default: $(NAME).pdf

all: $(NAME).pdf

Andreas Zwinkau's avatar
Revised  
Andreas Zwinkau committed
7
build/%.pdf: %.tex *.sty
Andreas Zwinkau's avatar
initial  
Andreas Zwinkau committed
8 9 10 11 12 13 14 15 16
	mkdir -p build
	latexmk -pdf -g -f -auxdir=build -outdir=build $<

%.pdf: build/%.pdf
	mv $< $@ # atomic!
	cp $@ $<

.PHONY: show clean distclean

Andreas Zwinkau's avatar
Revised  
Andreas Zwinkau committed
17
show: $(NAME).pdf
Andreas Zwinkau's avatar
initial  
Andreas Zwinkau committed
18 19 20 21 22 23 24 25
	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