tex用Makefileの雛形

# texのためのMakefile

TEX = platex
TARGET = report_kouki1
DVI_TO_PDF = dvipdfmx
PDF_VIEWER = evince

.SUFFIXES: .pdf .dvi .tex

all: $(TARGET).pdf

view: all
	$(PDF_VIEWER) $(TARGET).pdf&

clean:
	-rm $(TARGET).pdf

.dvi.pdf:
	$(DVI_TO_PDF) $*

.tex.dvi:
	nkf -e $< > new$<
	$(TEX) new$<
	$(TEX) new$<
	mv new$*.dvi $*.dvi
	rm new$*.log
	rm new$*.aux
	rm new$*.tex