Skip to content

Commit

Permalink
Updated Makefile
Browse files Browse the repository at this point in the history
* Now using 'latexmk' for creating the PDF
* Default values of MAIN and COMMIT are shown in help text
  • Loading branch information
christian-krieg committed May 5, 2021
1 parent 315f3a5 commit 1b2fb9f
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
#COMMIT=HEAD^
COMMIT=HEAD
MAIN=test
COMMIT := HEAD
MAIN := test.tex

.PHONY: pdf
pdf:
pdflatex -interaction nonstopmode ${MAIN}
biber ${MAIN}
pdflatex -interaction nonstopmode ${MAIN}
makeglossaries ${MAIN}
pdflatex -interaction nonstopmode ${MAIN}
pdflatex -interaction nonstopmode ${MAIN}
latexmk -pdf ${MAIN}

.PHONY: help
help:
@echo "make pdf [MAIN=<main>]"
@echo " Generate the PDF for the thesis. <main> defaults to 'main' and"
@echo " refers to the base name of the main LaTeX file also called the"
@echo " 'jobname' in pdflatex)"
@echo " Generate the PDF for the thesis. <main> defaults to '$(MAIN)'"
@echo " and refers to the main LaTeX file"
@echo ""
@echo "make diff [COMMIT=hash] [MAIN=<main>]"
@echo " Generate a PDF that shows the differences from the current"
@echo " HEAD to the commit identified by its hash given as COMMIT."
@echo " By default, COMMIT is 'HEAD^'"
@echo " By default, COMMIT is '$(COMMIT)'"
@echo ""

.PHONY: diff
diff:
git latexdiff --run-biber --view --pdf-viewer evince --output diff.pdf --main ${MAIN}.tex --ignore-makefile --ignore-latex-errors ${COMMIT} --
git latexdiff --run-biber --view --pdf-viewer evince --output diff.pdf --main ${MAIN} --ignore-latex-errors ${COMMIT} --

0 comments on commit 1b2fb9f

Please sign in to comment.