meillo@5: # generic Makefile for latex docs meillo@5: # by meillo@marmaro.de meillo@5: # meillo@5: # Attention: needs GNUmake for patsubst and wildcard meillo@5: meillo@5: meillo@5: SRC = *.tex meillo@5: OBJ = $(patsubst %.tex, %.pdf, $(wildcard *.tex)) meillo@5: PDFLATEX = pdflatex meillo@5: meillo@5: meillo@5: all: ${OBJ} meillo@5: meillo@5: meillo@5: #.tex.pdf: meillo@5: %.pdf: %.tex meillo@5: @echo generating $< meillo@5: #@for i in $< ; do meillo@5: @ ${PDFLATEX} $< meillo@5: # @done meillo@5: meillo@5: meillo@5: dist: realclean meillo@5: # generate 3 times for correct toc and pagenumbers meillo@5: ${MAKE} all meillo@5: ${MAKE} rmpdf meillo@5: ${MAKE} all meillo@5: ${MAKE} rmpdf meillo@5: ${MAKE} all meillo@5: meillo@5: meillo@5: clean: meillo@5: @echo 'cleaning ...' meillo@5: @rm -f *.{aux,lof,log,lot,nav,out,snm,toc} meillo@5: meillo@5: rmpdf: meillo@5: @echo 'removing PDFs ...' meillo@5: @rm -f *.pdf meillo@5: meillo@5: realclean: clean rmpdf meillo@5: meillo@5: xpdf: all meillo@5: xpdf -z page *.pdf meillo@5: meillo@5: meillo@5: .PHONY: all xpdf dist clean realclean rmpdf meillo@5: .SUFFIXES: .tex .pdf meillo@5: meillo@5: meillo@5: #merge: meillo@5: # rm -f all.pdf meillo@5: # pdftk A=00_vorstellung.pdf cat A1-2 output 00_vorstellung-mod.pdf && rm 00_vorstellung.pdf meillo@5: # pdftk *.pdf cat output all.pdf meillo@5: meillo@5: #xpdf: ${OBJ} meillo@5: # @echo xpdf $@ meillo@5: # @xpdf -fullscreen -z page ${OBJ} & meillo@5: # #@rm ${OBJ}