Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #190 from andreas-marschke/gh-pages

Add Makefile: simplify building outputs
  • Loading branch information...
commit 311f6dc4f9fbe110537152b4a01ba129f1034bc2 2 parents 1de2ea2 + bc3c839
@addyosmani authored
Showing with 33 additions and 0 deletions.
  1. +33 −0 Makefile
View
33 Makefile
@@ -0,0 +1,33 @@
+
+include_dir=build
+pandoc=`which pandoc`
+source=index.md
+title="Developing Backbone.js Applications"
+filename="backbone-fundamentals"
+pdflatex=`which pdflatex`
+
+all: pdf html epub rtf
+
+pdf: $(sorce)
+ $(pandoc) -s $(source) -o $(filename).tex -w latex \
+ --title-prefix=$(filename)
+ $(pdflatex) $(filename).tex
+
+html: $(source)
+ $(pandoc) -s $(source) -o index.html -c style.css \
+ --include-before-body=$(include_dir)/author.html \
+ --include-before-body=$(include_dir)/share.html \
+ --include-after-body=$(include_dir)/stats.html \
+ --title-prefix=$(title)
+
+epub: $(source)
+ $(pandoc) -s $(source) -t epub --epub-metadata=$(include_dir)/metadata.xml \
+ -o $(filename).epub --epub-stylesheet=epub.css --title-prefix=$(title) \
+ --epub-cover-image=img/cover.jpg
+
+clean:
+ rm -f $(filename).aux \
+ $(filename).db \
+ $(filename).log \
+ $(filename).out \
+ $(filename).tex

0 comments on commit 311f6dc

Please sign in to comment.
Something went wrong with that request. Please try again.