MAKE=make -f Makefile LATEX=uplatex BIBTEX=pbibtex MAKEINDEX=upmendex DVIPS=dvips DVIPDFM=dvipdfmx TARGET=master_paper PS_SUFFIX=.ps PDF_SUFFIX=.pdf .SUFFIXES: .tex .dvi # commands .PHONY : clean open remake $(TARGET).pdf:$(TARGET).dvi @echo "========== GENERATE PDF file ==========" $(LATEX) $(TARGET) > /dev/null $(DVIPDFM) $(TARGET) open $(TARGET).pdf $(TARGET).dvi: $(wildcard *.tex) $(wildcard chapter/*.tex) @echo "========== PUBLISHING ==========" @echo "\t first..." $(LATEX) $(TARGET) $(LATEX) $(TARGET) > /dev/null $(BIBTEX) $(TARGET) -$(MAKEINDEX) $(TARGET) @echo "\t second..." $(LATEX) $(TARGET) > /dev/null open:$(TARGET).pdf open $(TARGET).pdf clean: rm -f *.dvi *.aux *.log *.ilg *.ps *.gz *.bbl *.blg *.toc *~ *.core *.cpt *.lof *.lot *.lol *.bbl *.blg *.idx src/**/*.replaced *.fdb_latexmk *.fls remake: make clean make