summaryrefslogtreecommitdiff
path: root/dsg2000/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'dsg2000/Makefile')
-rw-r--r--dsg2000/Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/dsg2000/Makefile b/dsg2000/Makefile
index 9dff22d..247f524 100644
--- a/dsg2000/Makefile
+++ b/dsg2000/Makefile
@@ -1,16 +1,22 @@
META = title.yml
-OUTPUT = dsg2000.epub
+OUTPUT = dsg2000.epub dsg2000.pdf dsg2000.mobi dsg2000.azw3
INPUT = $(sort $(wildcard art??-par*.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)
+dsg2000.epub: $(INPUT) $(META)
+ pandoc -f markdown+fancy_lists -t epub3 -o $@ --smart --toc \
+ --toc-depth=2 --epub-chapter-level=1 $(META) $(INPUT)
-mobi: $(OUTPUT)
- kindlegen $(OUTPUT) -c2 -o $(OUTPUT:.epub=.mobi)
+dsg2000.mobi: dsg2000.epub
+ ebook-convert $< $@ --mobi-file-type both
+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) $(OUTPUT:.epub=.mobi)
+ rm -rf $(OUTPUT)