RM          = rm -rf
TMP_SUFFS   = pdf aux bbl blg log dvi ps eps out
NAME = ms

all: ${NAME}.pdf

vc.tex: ../.git/logs/HEAD
	echo "%%% This file is generated by the Makefile." > vc.tex
	git log -1 --date=short --format="format:\\newcommand{\\githash}{%h}\\newcommand{\\gitdate}{%ad}\\newcommand{\\gitauthor}{%an}" >> vc.tex

${NAME}.pdf: ${NAME}.tex *.bib vc.tex
	tectonic ${NAME}.tex

clean:
	${RM} $(foreach suff, ${TMP_SUFFS}, ${NAME}.${suff})
	${RM} msNotes.bib
