Last active
November 28, 2018 14:04
-
-
Save vsbuffalo/0da57f34af384b79d1e9 to your computer and use it in GitHub Desktop.
finally, a LaTeX makefile that captures your anger and frustration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks https://github.com/EBI-predocs/latex-thesis/blob/master/Makefile for | |
# some tips | |
LATEXMK = latexmk -xelatex | |
# CONFIG | |
target = manuscript | |
references = bib.bib | |
# SETUP | |
includes := $(shell ls *.tex) ${references} | |
.PHONY: ${target} | |
${target}: ${target}.pdf | |
${target}.pdf: ${includes} | |
${LATEXMK} ${target} | |
force: build-my-fucking-pdf | |
build-my-fucking-pdf: ${target} | |
${LATEXMK} -pvc -g ${target} | |
preview: | |
${LATEXMK} -pvc ${target} | |
tidy: | |
latexmk -c ${target} | |
clean: | |
latexmk -C ${target} | |
nuke-biber: | |
# Too bad this doesn't handle Canadian singers too | |
${RM} -r $(shell biber --cache) # biber, you suck. | |
nuke: nuke-biber | |
# don't even trust latexmk not to fuck something up | |
${RM} $(filter-out %.tex %.pdf,$(shell ls ${target}.*)) | |
calm: | |
@echo "downloading your calming quote..." | |
curl https://gist.githubusercontent.com/vsbuffalo/04ad93826edb6525ec6f/raw/9563e1e3c2bfde9aad4dd9e51e1a2087f2b822f1/gistfile1.txt 2> /dev/null | gshuf -n1 | sed 's/::: /-/' | |
anger: | |
@echo "don't worry, LaTeX really is shitty." | |
.PHONY: clean preview nuke tidy force build-my-fucking-pdf calm nuke-biber all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment