Skip to content

Commit

Permalink
Create Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Sep 8, 2016
1 parent b7cb277 commit cc4ec34
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Makefile
@@ -0,0 +1,26 @@
SHELL=/bin/bash

book = dancerwebbook
chapters = $(shell cat chapters.txt)

epub: book

book: $(book).epub

mobi: $(book).mobi

pdf: $(book).pdf

$(book).mobi: $(book).epub
kindlegen -verbose $(book).epub

$(book).epub: $(chapters) epub.css title.txt metadata.xml epub.css cover.png chapters.txt
pandoc -o $(book).epub title.txt $(chapters) --epub-metadata=metadata.xml --toc --toc-depth=2 --epub-stylesheet=epub.css --epub-cover-image=cover.png

$(book).pdf: $(book).epub
ebook-convert $(book).epub $(book).pdf

clean:
rm -f $(book).{pdf,epub,mobi}

.PHONY: clean

0 comments on commit cc4ec34

Please sign in to comment.