aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d77dac2..c935bda 100644
--- a/Makefile
+++ b/Makefile
@@ -20,12 +20,15 @@ reproducible-paper.pdf: reproducible-paper.tex \
tex/project-graph.tex tex/git-branch.tex
# We'll run pdflatex two times so the page numbers and
# internal links also work.
+ if [ -d .git ]; then v=$$(git describe --dirty --always --long); \
+ else v=NO-GIT; fi; \
+ echo "\newcommand{\gitcommit}{$$v}" > git-commit.tex
pdflatex reproducible-paper
pdflatex reproducible-paper
# Clean all extra files
.PHONY: clean-latex clean
clean-latex:
- rm -f *.aux *.log *.nav *.out *.snm *.toc
+ rm -f *.aux *.log *.nav *.out *.snm *.toc git-commit.tex
clean: clean-latex
rm *.pdf