summaryrefslogtreecommitdiff
path: root/dsgvo/Makefile
blob: a66c6f2abcf9f3f524a5cd14a5ea01234b8284bb (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
META   =  title.yml
OUTPUT =  dsgvo.epub dsgvo.pdf dsgvo.mobi dsgvo.azw3
INPUT  =  ch01/ch01.md $(sort $(wildcard ch01/ch01-art??.md))
INPUT  += ch02/ch02.md $(sort $(wildcard ch02/ch02-art??.md))
INPUT  += ch03/ch03.md $(sort $(wildcard ch03/ch03-art??.md))
INPUT  += ch04/ch04.md $(sort $(wildcard ch04/ch04-art??.md))
INPUT  += ch05/ch05.md $(sort $(wildcard ch05/ch05-art??.md))
INPUT  += ch06/ch06.md $(sort $(wildcard ch06/ch06-art??.md))
INPUT  += ch07/ch07.md $(sort $(wildcard ch07/ch07-art??.md))
INPUT  += ch08/ch08.md $(sort $(wildcard ch08/ch08-art??.md))
INPUT  += ch09/ch09.md $(sort $(wildcard ch09/ch09-art??.md))
INPUT  += ch10/ch10.md $(sort $(wildcard ch10/ch10-art??.md))
INPUT  += ch11/ch11.md $(sort $(wildcard ch11/ch11-art??.md))

all: $(OUTPUT)

dsgvo.epub: $(INPUT) $(META)
	pandoc -f markdown+fancy_lists -t epub3 -o $@ --smart --toc \
		--toc-depth=2 --epub-chapter-level=1 $(META) $(INPUT)

dsgvo.mobi: dsgvo.epub
	ebook-convert $< $@ --mobi-file-type both

dsgvo.azw3: dsgvo.epub
	ebook-convert $< $@

dsgvo.pdf: $(INPUT) $(META)
	pandoc -f markdown+fancy_lists -t latex -o $@ --standalone --smart --toc \
		--toc-depth=2 -Vfontsize=12pt -Vpapersize=a4wide $(META) $(INPUT)

clean:
	rm -rf $(OUTPUT)