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)) .PHONY: pdf epub mobi azw3 clean all all: .PHONY: pdf epub mobi azw3 dsgvo.pdf: $(INPUT) $(META) pandoc -f markdown+fancy_lists -t latex -o $@ --toc --toc-depth=2 \ -Vgeometry:"a4paper,top=2cm,bottom=2cm,left=2cm,right=2cm" \ -Vlang=de --standalone --smart $(META) $(INPUT) 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 $< $@ clean: rm -rf $(OUTPUT)