-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
36 lines (27 loc) · 910 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
26
27
28
29
30
31
32
33
34
35
36
all: pdf fb2 epub
pdf: metadata
rubber -m xelatex faif-2.0.tex
cp faif-2.0.pdf faif-2.0-$(shell git describe --abbrev=0 --tags).pdf
fb2: metadata
pandoc -t fb2 -o faif-2.0.fb2 faif-2.0.tex
cp faif-2.0.fb2 faif-2.0-$(shell git describe --abbrev=0 --tags).fb2
epub: metadata
pandoc -t epub -o faif-2.0.epub faif-2.0.tex
cp faif-2.0.epub faif-2.0-$(shell git describe --abbrev=0 --tags).epub
metadata: translators version time
open: all
xdg-open faif-2.0.pdf
clean:
git clean -xfd
translators:
git shortlog --summary --numbered | cut -c8- | awk 1 ORS=', ' \
| sed 's/, $$/./' | rev | sed 's/ ,/ и /' | rev \
> translators.tex
version:
git describe --abbrev=0 --tags | tr -d '\n' > build-ver.tex
echo -n '-' >> build-ver.tex
git rev-parse --short HEAD | tr -d '\n' >> build-ver.tex
echo -n ',' >> build-ver.tex
time:
date -I | tr -d '\n' > build-time.tex
echo -n '.' >> build-time.tex