gesetze/dsg2000/Makefile

34 lines
776 B
Makefile

META = title.yml
OUTPUT = dsg2000.epub dsg2000.pdf dsg2000.mobi dsg2000.azw3
INPUT = $(sort $(wildcard art??-par*.md))
.PHONY: pdf epub mobi azw3 clean all
all: pdf epub mobi azw3
pdf: dsg2000.pdf
epub: dsg2000.epub
mobi: dsg2000.mobi
azw3: dsg2000.azw3
dsg2000.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)
dsg2000.epub: $(INPUT) $(META)
pandoc -f markdown+fancy_lists -t epub3 -o $@ --smart --toc \
--toc-depth=2 --epub-chapter-level=1 $(META) $(INPUT)
dsg2000.mobi: dsg2000.epub
ebook-convert $< $@ --mobi-file-type both
dsg2000.azw3: dsg2000.epub
ebook-convert $< $@
clean:
rm -rf $(OUTPUT)