Skip to content

Instantly share code, notes, and snippets.

@DiKorsch
Created March 27, 2017 12:32
Show Gist options
  • Save DiKorsch/fa3a871cab62a2c38c4a31900d7b6a30 to your computer and use it in GitHub Desktop.
Save DiKorsch/fa3a871cab62a2c38c4a31900d7b6a30 to your computer and use it in GitHub Desktop.
Simple generic latexmk Makefile
TEX=latexmk
OUT_FOLDER=.out
OPTS=-output-directory=${OUT_FOLDER} -pdf
PDF_VIEWER=okular
PDFS=YOUR_PDF.pdf
main: ${PDFS}
%.pdf : %.tex
${TEX} ${OPTS} $<
cp ${OUT_FOLDER}/$@ $@
show: main
${PDF_VIEWER} ${PDFS}
clean:
${TEX} ${OPTS} -c
clean-all:
${TEX} ${OPTS} -C
rm -f ${PDFS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment