From c9a341e3681a2d281d5c4e7b450e80db2bd5da40 Mon Sep 17 00:00:00 2001 From: Jianwen WEI Date: Thu, 16 May 2013 19:56:05 +0800 Subject: [PATCH] Rewirte the Makefile rules with latexmk. --- .gitignore | 2 ++ .latexmkrc | 1 + Makefile | 35 ++++------------------------------- 3 files changed, 7 insertions(+), 31 deletions(-) create mode 100644 .latexmkrc diff --git a/.gitignore b/.gitignore index 73dbd720..4cf728be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.bak +*.fls *.aux *.log *.lot @@ -13,3 +14,4 @@ *~ *.fdb_latexmk diss.pdf +temptest.pdf diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 00000000..da925080 --- /dev/null +++ b/.latexmkrc @@ -0,0 +1 @@ +$pdflatex = 'xelatex --shell-escape %O %S'; diff --git a/Makefile b/Makefile index 5a28720b..46e892e8 100644 --- a/Makefile +++ b/Makefile @@ -17,40 +17,13 @@ all: $(THESISMAIN).pdf .PHONY : all clean version distclean cleantest release $(THESISMAIN).pdf : $(THESISMAIN).tex body/*.tex reference/*.bib *.cls *.cfg - xelatex -no-pdf --interaction=nonstopmode $(THESISMAIN) &> /dev/null - -bibtex $(THESISMAIN) &> /dev/null - xelatex -no-pdf --interaction=nonstopmode $(THESISMAIN) &> /dev/null - xelatex --interaction=nonstopmode $(THESISMAIN) &> /dev/null - + latexmk -pdf $(THESISMAIN) + view : $(THESISMAIN).pdf $(VIEWER) $< & clean : - -@rm -f \ - *~ \ - *.aux \ - *.bak \ - *.bbl \ - *.blg \ - *.dvi \ - *.xdv \ - *.glo \ - *.gls \ - *.idx \ - *.ilg \ - *.ind \ - *.ist \ - *.log \ - *.out \ - *.ps \ - *.thm \ - *.toc \ - *.lof \ - *.lot \ - *.loe \ - *_latexmk \ - body/*.aux \ - body/x.log + latexmk -C distclean : clean -@rm -f $(THESISMAIN).pdf @@ -58,7 +31,7 @@ distclean : clean test : $(TESTFILE).pdf $(TESTFILE).pdf : $(TESTFILE).tex - xelatex $(TESTFILE) > /dev/null + latexmk -pdf $(TESTFILE) > /dev/null $(VIEWER) $@ cleantest :