Skip to content

Commit

Permalink
Cleverer Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Nov 16, 2014
1 parent 6d1fd8c commit 27a371d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
@@ -1,10 +1,16 @@

chapters = $(shell cat chapters.txt)

book: perlwebbook.epub

mobi: perlwebbook.mobi

perlwebbook.mobi: perlwebbook.epub
kindlegen perlwebbook.epub
kindlegen -verbose perlwebbook.epub

perlwebbook.epub: $(chapters)
pandoc -o perlwebbook.epub title.txt $(chapters) --epub-metadata=metadata.xml --toc --toc-depth=2

clean:
rm perlwebbook.epub perlwebbook.mobi

perlwebbook.epub: chapters/how_the_web_works.md
pandoc -o perlwebbook.epub title.txt chapters/how_the_web_works.md --epub-metadata=metadata.xml --toc --toc-depth=2

0 comments on commit 27a371d

Please sign in to comment.