define gitcommit
        if git status $@ | grep -q modified:; then git commit -m'Re-generated $@' $@; fi
endef

all: cv_tuomas_jormola.pdf index.mdwn

clean:
        rm -f cv_tuomas_jormola.aux cv_tuomas_jormola.log cv_tuomas_jormola.out

cv_tuomas_jormola.pdf: cv_tuomas_jormola.tex cv_photo.png
        pdflatex cv_tuomas_jormola.tex
#  $(gitcommit)

index.mdwn: cv_to_mdwn.pl cv_tuomas_jormola.tex
        ./cv_to_mdwn.pl < cv_tuomas_jormola.tex > $@
#  $(gitcommit)

.PHONY: all clean