summaryrefslogtreecommitdiff
path: root/dsgvo/Makefile
blob: ee97464d726d5d34e3d235eacf67b8d749dbb810 (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
META   =  title.yml
OUTPUT =  dsgvo.epub
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)

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

mobi: $(OUTPUT)
	kindlegen $(OUTPUT) -c2 -o $(OUTPUT:.epub=.mobi)


clean:
	rm -rf $(OUTPUT) $(OUTPUT:.epub=.mobi)