Cleanup Makefiles

This commit is contained in:
Peter 2017-03-27 11:15:41 +02:00
parent 0bd8200777
commit 1fe4e569c1
Signed by: pludi
GPG Key ID: CFBA360E696EDC99
3 changed files with 40 additions and 15 deletions

View File

@ -2,7 +2,22 @@ META = title.yml
OUTPUT = dsg2000.epub dsg2000.pdf dsg2000.mobi dsg2000.azw3
INPUT = $(sort $(wildcard art??-par*.md))
all: $(OUTPUT)
.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 \
@ -14,9 +29,5 @@ dsg2000.mobi: dsg2000.epub
dsg2000.azw3: dsg2000.epub
ebook-convert $< $@
dsg2000.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)

View File

@ -12,7 +12,14 @@ 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)
.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 \
@ -24,9 +31,5 @@ dsgvo.mobi: dsgvo.epub
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)

View File

@ -9,7 +9,22 @@ INPUT += tit05.md $(sort $(wildcard tit05-art??.md))
INPUT += tit06.md $(sort $(wildcard tit06-art??.md))
INPUT += tit07.md $(sort $(wildcard tit07-art??.md))
all: $(OUTPUT)
.PHONY: pdf epub mobi azw3 clean all
all: pdf epub mobi azw3
pdf: grch.pdf
epub: grch.epub
mobi: grch.mobi
azw3: grch.azw3
grch.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)
grch.epub: $(INPUT) $(META)
pandoc -f markdown+fancy_lists -t epub3 -o $@ --smart --toc \
@ -21,9 +36,5 @@ grch.mobi: grch.epub
grch.azw3: grch.epub
ebook-convert $< $@
grch.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)