aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: c935bdadb29d9931b3418d75154a30a0a7e60fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Automatically build the slides on the reproducible paper
#
# Copyright (C) 2018-2019 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This Makefile is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This Makefile is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this Makefile.  If not, see <https://www.gnu.org/licenses/>.

# PDF slides:
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 git-commit.tex
clean: clean-latex
	rm *.pdf