Skip to content

Commit

Permalink
Rewirte the Makefile rules with latexmk.
Browse files Browse the repository at this point in the history
  • Loading branch information
weijianwen committed May 16, 2013
1 parent c44ca96 commit c9a341e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.bak
*.fls
*.aux
*.log
*.lot
Expand All @@ -13,3 +14,4 @@
*~
*.fdb_latexmk
diss.pdf
temptest.pdf
1 change: 1 addition & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$pdflatex = 'xelatex --shell-escape %O %S';
35 changes: 4 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,21 @@ 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

test : $(TESTFILE).pdf

$(TESTFILE).pdf : $(TESTFILE).tex
xelatex $(TESTFILE) > /dev/null
latexmk -pdf $(TESTFILE) > /dev/null
$(VIEWER) $@

cleantest :
Expand Down

0 comments on commit c9a341e

Please sign in to comment.