-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
26 lines (18 loc) · 611 Bytes
/
Makefile
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
TARGET=DigSig2.pdf
LL=latexmk -pdf
CLEAN=latexmk -C
all: revision.tex $(TARGET)
pdf: revision.tex $(TARGET)
.PHONY : clean revision.tex $(TARGET)
revision.tex:
echo "% Autogenerated, do not edit" > revision.tex
echo "\\newcommand{\\revisiondate}{`git log -1 --format=\"%ad\" --date=short`}" >> revision.tex
echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> revision.tex
echo "\\newcommand{\\revisionmodified}{`git status --porcelain|cut -d\" \" -f2|head -n1`}" >> revision.tex
$(TARGET): $(TARGET:%.pdf=%.tex)
$(LL) $<
clean:
$(CLEAN)
rm -f revision.tex
run:
xdg-open $(TARGET) &